diff --git a/Cargo.toml b/Cargo.toml index 6d1d0ad0..04375b9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,6 +69,7 @@ cast_precision_loss = "warn" cast_sign_loss = "warn" checked_conversions = "warn" implicit_saturating_sub = "warn" +integer_division_remainder_used = "warn" manual_assert = "warn" map_unwrap_or = "warn" missing_errors_doc = "warn" diff --git a/src/algorithms/generate.rs b/src/algorithms/generate.rs index ec713d33..a7dc5506 100644 --- a/src/algorithms/generate.rs +++ b/src/algorithms/generate.rs @@ -1,5 +1,7 @@ //! Generate prime components for the RSA Private Key +#![allow(clippy::integer_division_remainder_used, reason = "TODO")] + use alloc::vec::Vec; use crypto_bigint::{BoxedUint, Odd}; use crypto_primes::{ diff --git a/src/algorithms/pad.rs b/src/algorithms/pad.rs index 3f813bba..f5502e10 100644 --- a/src/algorithms/pad.rs +++ b/src/algorithms/pad.rs @@ -81,6 +81,7 @@ pub(crate) fn i2osp_zeroizing(input: BoxedUint, padded_len: usize) -> Zeroizing< /// /// [RFC8017 ยง4.2]: https://www.rfc-editor.org/rfc/rfc8017.html#section-4.2 #[inline] +#[allow(clippy::integer_division_remainder_used, reason = "debug")] pub(crate) fn os2ip(input: &[u8], bits_precision: u32) -> Result { debug_assert_eq!(bits_precision % crypto_bigint::Limb::BITS, 0); Ok(BoxedUint::from_be_slice(input, bits_precision)?)