diff --git a/src/uint/modular/constant_mod/const_pow.rs b/src/uint/modular/constant_mod/const_pow.rs index 60455b05..ea3dd1cd 100644 --- a/src/uint/modular/constant_mod/const_pow.rs +++ b/src/uint/modular/constant_mod/const_pow.rs @@ -4,8 +4,11 @@ use super::{Residue, ResidueParams}; impl, const LIMBS: usize> Residue { /// Raises to the `exponent` power. - pub const fn pow(&self, exponent: &Uint) -> Residue { - self.pow_bounded_exp(exponent, Uint::::BITS) + pub const fn pow( + &self, + exponent: &Uint, + ) -> Residue { + self.pow_bounded_exp(exponent, Uint::::BITS) } /// Raises to the `exponent` power, @@ -13,9 +16,9 @@ impl, const LIMBS: usize> Residue { /// to take into account for the exponent. /// /// NOTE: `exponent_bits` may be leaked in the time pattern. - pub const fn pow_bounded_exp( + pub const fn pow_bounded_exp( &self, - exponent: &Uint, + exponent: &Uint, exponent_bits: usize, ) -> Residue { Self { diff --git a/src/uint/modular/pow.rs b/src/uint/modular/pow.rs index 5ab1fd63..db9ac997 100644 --- a/src/uint/modular/pow.rs +++ b/src/uint/modular/pow.rs @@ -6,9 +6,9 @@ use super::mul::{mul_montgomery_form, square_montgomery_form}; /// `exponent_bits` represents the number of bits to take into account for the exponent. /// /// NOTE: this value is leaked in the time pattern. -pub const fn pow_montgomery_form( +pub const fn pow_montgomery_form( x: &Uint, - exponent: &Uint, + exponent: &Uint, exponent_bits: usize, modulus: &Uint, r: &Uint, diff --git a/src/uint/modular/runtime_mod/runtime_pow.rs b/src/uint/modular/runtime_mod/runtime_pow.rs index 270f4c01..889e41bf 100644 --- a/src/uint/modular/runtime_mod/runtime_pow.rs +++ b/src/uint/modular/runtime_mod/runtime_pow.rs @@ -4,8 +4,11 @@ use super::DynResidue; impl DynResidue { /// Raises to the `exponent` power. - pub const fn pow(&self, exponent: &Uint) -> DynResidue { - self.pow_bounded_exp(exponent, Uint::::BITS) + pub const fn pow( + &self, + exponent: &Uint, + ) -> DynResidue { + self.pow_bounded_exp(exponent, Uint::::BITS) } /// Raises to the `exponent` power, @@ -13,7 +16,11 @@ impl DynResidue { /// to take into account for the exponent. /// /// NOTE: `exponent_bits` may be leaked in the time pattern. - pub const fn pow_bounded_exp(&self, exponent: &Uint, exponent_bits: usize) -> Self { + pub const fn pow_bounded_exp( + &self, + exponent: &Uint, + exponent_bits: usize, + ) -> Self { Self { montgomery_form: pow_montgomery_form( &self.montgomery_form,