crypto_bigint::prelude

Trait Square

Source
pub trait Square: Sized
where for<'a> &'a Self: Mul<&'a Self, Output = Self>,
{ // Provided method fn square(&self) -> Self { ... } }
Expand description

Support for optimized squaring

Provided Methods§

Source

fn square(&self) -> Self

Computes the same as self.mul(self), but may be more efficient.

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<MOD: ResidueParams<LIMBS>, const LIMBS: usize> Square for Residue<MOD, LIMBS>

Source§

impl<const LIMBS: usize> Square for DynResidue<LIMBS>