Skip to main content

InnerTransparentField

Trait InnerTransparentField 

Source
pub trait InnerTransparentField: PrimeField {
    // Required methods
    fn add_inner(
        lhs: &Self::Inner,
        rhs: &Self::Inner,
        config: &Self::Config,
    ) -> Self::Inner;
    fn sub_inner(
        lhs: &Self::Inner,
        rhs: &Self::Inner,
        config: &Self::Config,
    ) -> Self::Inner;
    fn mul_assign_by_inner(&mut self, rhs: &Self::Inner);
}
Expand description

A trait for fields that allow to perform operations on inner Montgomery representations of field elements.

Required Methods§

Source

fn add_inner( lhs: &Self::Inner, rhs: &Self::Inner, config: &Self::Config, ) -> Self::Inner

Add inner Montgomery representations using a config.

Source

fn sub_inner( lhs: &Self::Inner, rhs: &Self::Inner, config: &Self::Config, ) -> Self::Inner

Subtract inner Montgomery representations using a config.

Source

fn mul_assign_by_inner(&mut self, rhs: &Self::Inner)

Multiply a field element by an inner Montgomery representation.

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.

Implementations on Foreign Types§

Source§

impl<Mod: ConstMontyParams<LIMBS>, const LIMBS: usize> InnerTransparentField for ConstMontyField<Mod, LIMBS>

Source§

fn add_inner( lhs: &Self::Inner, rhs: &Self::Inner, _config: &Self::Config, ) -> Self::Inner

Source§

fn sub_inner( lhs: &Self::Inner, rhs: &Self::Inner, _config: &Self::Config, ) -> Self::Inner

Source§

fn mul_assign_by_inner(&mut self, rhs: &Self::Inner)

Source§

impl<const LIMBS: usize> InnerTransparentField for MontyField<LIMBS>

Source§

fn add_inner( lhs: &Self::Inner, rhs: &Self::Inner, config: &Self::Config, ) -> Self::Inner

Source§

fn sub_inner( lhs: &Self::Inner, rhs: &Self::Inner, config: &Self::Config, ) -> Self::Inner

Source§

fn mul_assign_by_inner(&mut self, rhs: &Self::Inner)

Implementors§