Skip to main content

pow_montgomery_form_amm

Function pow_montgomery_form_amm 

Source
pub fn pow_montgomery_form_amm<'a, U>(
    x: &U,
    exponent: &U,
    exponent_bits: u32,
    params: &'a <U::MontyForm as MontyForm>::Params,
) -> U
Expand description

Performs modular exponentiation using “Almost Montgomery Multiplication”.

Returns a result which has been fully reduced by the modulus specified in params.

exponent_bits represents the length of the exponent in bits.

NOTE: exponent_bits is leaked in the time pattern.