crypto_bigint::prelude

Trait MultiExponentiateBoundedExp

Source
pub trait MultiExponentiateBoundedExp<Exponent, BasesAndExponents>: Pow<Exponent> + Sized
where BasesAndExponents: AsRef<[(Self, Exponent)]> + ?Sized,
{ // Required method fn multi_exponentiate_bounded_exp( bases_and_exponents: &BasesAndExponents, exponent_bits: usize, ) -> Self; }
Expand description

Performs modular multi-exponentiation using Montgomery’s ladder. exponent_bits represents the number of bits to take into account for the exponent.

See: Straus, E. G. Problems and solutions: Addition chains of vectors. American Mathematical Monthly 71 (1964), 806–808.

NOTE: this value is leaked in the time pattern.

Required Methods§

Source

fn multi_exponentiate_bounded_exp( bases_and_exponents: &BasesAndExponents, exponent_bits: usize, ) -> Self

Calculates x1 ^ k1 * ... * xn ^ kn.

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<const N: usize, MOD: ResidueParams<LIMBS>, const LIMBS: usize, const RHS_LIMBS: usize> MultiExponentiateBoundedExp<Uint<RHS_LIMBS>, [(Residue<MOD, LIMBS>, Uint<RHS_LIMBS>); N]> for Residue<MOD, LIMBS>

Source§

impl<const N: usize, const LIMBS: usize, const RHS_LIMBS: usize> MultiExponentiateBoundedExp<Uint<RHS_LIMBS>, [(DynResidue<LIMBS>, Uint<RHS_LIMBS>); N]> for DynResidue<LIMBS>