diff --git a/src/modular/boxed_monty_form.rs b/src/modular/boxed_monty_form.rs index 5098d5db5..5d989156d 100644 --- a/src/modular/boxed_monty_form.rs +++ b/src/modular/boxed_monty_form.rs @@ -13,9 +13,7 @@ use super::{ Retrieve, }; use crate::{BoxedUint, Limb, Monty, Odd, Word}; - -#[cfg(feature = "std")] -use std::sync::Arc; +use alloc::sync::Arc; #[cfg(feature = "zeroize")] use zeroize::Zeroize; @@ -123,12 +121,6 @@ pub struct BoxedMontyForm { montgomery_form: BoxedUint, /// Montgomery form parameters. - #[cfg(not(feature = "std"))] - params: BoxedMontyParams, - - /// Montgomery form parameters. - // Uses `Arc` when `std` is available. - #[cfg(feature = "std")] params: Arc, } diff --git a/src/modular/boxed_monty_form/inv.rs b/src/modular/boxed_monty_form/inv.rs index f7e357ad4..516cf899f 100644 --- a/src/modular/boxed_monty_form/inv.rs +++ b/src/modular/boxed_monty_form/inv.rs @@ -5,12 +5,10 @@ use crate::{ modular::BoxedBernsteinYangInverter, Invert, Inverter, PrecomputeInverter, PrecomputeInverterWithAdjuster, }; +use alloc::sync::Arc; use core::fmt; use subtle::CtOption; -#[cfg(feature = "std")] -use std::sync::Arc; - impl BoxedMontyForm { /// Computes `self^-1` representing the multiplicative inverse of `self`. /// I.e. `self * self^-1 = 1`. @@ -45,12 +43,6 @@ pub struct BoxedMontyFormInverter { inverter: BoxedBernsteinYangInverter, /// Residue parameters. - #[cfg(not(feature = "std"))] - params: BoxedMontyParams, - - /// Residue parameters. - // Uses `Arc` when `std` is available. - #[cfg(feature = "std")] params: Arc, }