crypto_bigint::prelude

Trait PowBoundedExp

Source
pub trait PowBoundedExp<Exponent> {
    // Required method
    fn pow_bounded_exp(&self, exponent: &Exponent, exponent_bits: usize) -> Self;
}
Expand description

Constant-time exponentiation with exponent of a bounded bit size.

Required Methods§

Source

fn pow_bounded_exp(&self, exponent: &Exponent, exponent_bits: usize) -> Self

Raises to the exponent power, with exponent_bits representing the number of (least significant) bits to take into account for the exponent.

NOTE: exponent_bits may be leaked in the time pattern.

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<MOD: ResidueParams<LIMBS>, const LIMBS: usize, const RHS_LIMBS: usize> PowBoundedExp<Uint<RHS_LIMBS>> for Residue<MOD, LIMBS>

Source§

impl<const LIMBS: usize, const RHS_LIMBS: usize> PowBoundedExp<Uint<RHS_LIMBS>> for DynResidue<LIMBS>