Skip to content

Commit 68a2287

Browse files
committed
Fix vartime method usage in constant-time methods
1 parent a98af2e commit 68a2287

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uint/div.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<const LIMBS: usize> Uint<LIMBS> {
8484

8585
/// Computes `self` % `rhs`, returns the remainder.
8686
pub const fn rem(&self, rhs: &NonZero<Self>) -> Self {
87-
self.div_rem_vartime(rhs).1
87+
self.div_rem(rhs).1
8888
}
8989

9090
/// Computes `self` % `rhs`, returns the remainder in variable-time with respect to `rhs`.
@@ -211,7 +211,7 @@ impl<const LIMBS: usize> Uint<LIMBS> {
211211
/// Perform checked reduction, returning a [`CtOption`] which `is_some`
212212
/// only if the rhs != 0
213213
pub fn checked_rem(&self, rhs: &Self) -> CtOption<Self> {
214-
NonZero::new(*rhs).map(|rhs| self.rem_vartime(&rhs))
214+
NonZero::new(*rhs).map(|rhs| self.rem(&rhs))
215215
}
216216
}
217217

0 commit comments

Comments
 (0)