pub trait ModSquarePrecomputed<RHS = Self, M = Self>: ModPowPrecomputed<RHS, M>where
    Self: Sized,
{ fn mod_square_precomputed(self, m: M, data: &Self::Data) -> Self::Output; }
Expand description

Squares a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

If multiple modular squarings with the same modulus are necessary, it can be quicker to precompute some piece of data using precompute_mod_pow_data function in ModMulPrecomputed and reuse it in the squaring calls.

Required Methods

Implementations on Foreign Types

Squares a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

Some precomputed data is provided; this speeds up computations involving several modular squarings with the same modulus. The precomputed data should be obtained using precompute_mod_pow_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Squares a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

Some precomputed data is provided; this speeds up computations involving several modular squarings with the same modulus. The precomputed data should be obtained using precompute_mod_pow_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Squares a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

Some precomputed data is provided; this speeds up computations involving several modular squarings with the same modulus. The precomputed data should be obtained using precompute_mod_pow_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Squares a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

Some precomputed data is provided; this speeds up computations involving several modular squarings with the same modulus. The precomputed data should be obtained using precompute_mod_pow_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Squares a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

Some precomputed data is provided; this speeds up computations involving several modular squarings with the same modulus. The precomputed data should be obtained using precompute_mod_pow_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Squares a number modulo another number $m$. Assumes the input is already reduced modulo $m$.

Some precomputed data is provided; this speeds up computations involving several modular squarings with the same modulus. The precomputed data should be obtained using precompute_mod_pow_data.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Implementors