crypto_bigint::prelude

Trait MultiExponentiate

Source
pub trait MultiExponentiate<Exponent, BasesAndExponents>: Pow<Exponent> + Sized
where 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.

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<T, Exponent, BasesAndExponents> MultiExponentiate<Exponent, BasesAndExponents> for T
where T: MultiExponentiateBoundedExp<Exponent, BasesAndExponents>, Exponent: Bounded, BasesAndExponents: AsRef<[(Self, Exponent)]> + ?Sized,