Skip to content

Commit

Permalink
Make Rem impl on Uint constant-time (#742)
Browse files Browse the repository at this point in the history
It was previously using `rem_vartime` as introduced in #466. This goes
against the "constant time by default" guarantees of this library.
  • Loading branch information
tarcieri authored Jan 20, 2025
1 parent 1a55153 commit b0e2657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uint/div.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ impl<const LIMBS: usize> Rem<NonZero<Uint<LIMBS>>> for Uint<LIMBS> {
type Output = Uint<LIMBS>;

fn rem(self, rhs: NonZero<Uint<LIMBS>>) -> Self::Output {
Self::rem_vartime(&self, &rhs)
Self::rem(&self, &rhs)
}
}

Expand Down

0 comments on commit b0e2657

Please sign in to comment.