Skip to main content

pow_montgomery_form

Function pow_montgomery_form 

Source
pub const fn pow_montgomery_form<const LIMBS: usize, const RHS_LIMBS: usize, const VARTIME: bool>(
    x: &Uint<LIMBS>,
    exponent: &Uint<RHS_LIMBS>,
    exponent_bits: u32,
    params: &FixedMontyParams<LIMBS>,
) -> Uint<LIMBS>
Expand description

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

NOTE: the value of exponent_bits is leaked in the time pattern.