diff --git a/src/arithmetic/bigint.rs b/src/arithmetic/bigint.rs index b326c35e74..9c72524970 100644 --- a/src/arithmetic/bigint.rs +++ b/src/arithmetic/bigint.rs @@ -83,7 +83,7 @@ impl Clone for Elem { impl Elem { #[inline] pub fn is_zero(&self) -> bool { - self.limbs.is_zero() + limb::limbs_are_zero_constant_time(&self.limbs) == LimbMask::True } } diff --git a/src/arithmetic/bigint/boxed_limbs.rs b/src/arithmetic/bigint/boxed_limbs.rs index 5064d3e1f4..361d8689d7 100644 --- a/src/arithmetic/bigint/boxed_limbs.rs +++ b/src/arithmetic/bigint/boxed_limbs.rs @@ -94,11 +94,6 @@ impl BoxedLimbs { Ok(r) } - #[inline] - pub(super) fn is_zero(&self) -> bool { - limb::limbs_are_zero_constant_time(&self.limbs) == LimbMask::True - } - pub(super) fn zero(len: usize) -> Self { Self { limbs: vec![0; len].into_boxed_slice(),