pub trait MultiExponentiate<Exponent, BasesAndExponents>: Pow<Exponent> + Sizedwhere
    BasesAndExponents: AsRef<[(Self, Exponent)]> + ?Sized,{
    // Required method
    fn multi_exponentiate(bases_and_exponents: &BasesAndExponents) -> Self;
}
Expand description

Performs modular multi-exponentiation using Montgomery’s ladder.

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

Required Methods§

source

fn multi_exponentiate(bases_and_exponents: &BasesAndExponents) -> Self

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, Exponent, BasesAndExponents> MultiExponentiate<Exponent, BasesAndExponents> for Twhere T: MultiExponentiateBoundedExp<Exponent, BasesAndExponents>, Exponent: Bounded, BasesAndExponents: AsRef<[(Self, Exponent)]> + ?Sized,