Trait crypto_bigint::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.

Object Safety§

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>