Skip to content

Commit

Permalink
p521: fix 32-bit targets
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Jan 10, 2024
1 parent bcc057d commit ddeaccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p521/src/arithmetic/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ impl Scalar {
///
/// Note: not constant-time with respect to the `shift` parameter.
#[cfg(target_pointer_width = "32")]
pub const fn shr_vartime(&self, shift: usize) -> Scalar {
pub const fn shr_vartime(&self, shift: u32) -> Scalar {
Self(u32x18_to_u64x9(
&U576::from_words(u64x9_to_u32x18(&self.0))
.shr_vartime(shift)
.wrapping_shr_vartime(shift)
.to_words(),
))
}
Expand Down

0 comments on commit ddeaccd

Please sign in to comment.