diff --git a/ml-kem/src/algebra.rs b/ml-kem/src/algebra.rs index 78dd3cb..dad1de0 100644 --- a/ml-kem/src/algebra.rs +++ b/ml-kem/src/algebra.rs @@ -8,7 +8,7 @@ use crate::param::{ArraySize, CbdSamplingSize}; use crate::util::{Truncate, B32}; #[cfg(feature = "zeroize")] -use zeroize::{Zeroize, ZeroizeOnDrop}; +use zeroize::Zeroize; pub type Integer = u16; @@ -24,9 +24,6 @@ impl Zeroize for FieldElement { } } -#[cfg(feature = "zeroize")] -impl ZeroizeOnDrop for FieldElement {} - impl FieldElement { pub const Q: Integer = 3329; pub const Q32: u32 = Self::Q as u32; @@ -196,9 +193,6 @@ impl Zeroize for NttPolynomial { } } -#[cfg(feature = "zeroize")] -impl ZeroizeOnDrop for NttPolynomial {} - impl Add<&NttPolynomial> for &NttPolynomial { type Output = NttPolynomial; @@ -447,9 +441,6 @@ where } } -#[cfg(feature = "zeroize")] -impl ZeroizeOnDrop for NttVector where K: ArraySize {} - impl Add<&NttVector> for &NttVector { type Output = NttVector; diff --git a/ml-kem/src/pke.rs b/ml-kem/src/pke.rs index 1a893ed..571a1d6 100644 --- a/ml-kem/src/pke.rs +++ b/ml-kem/src/pke.rs @@ -8,7 +8,7 @@ use crate::param::{EncodedCiphertext, EncodedDecryptionKey, EncodedEncryptionKey use crate::util::B32; #[cfg(feature = "zeroize")] -use zeroize::{Zeroize, ZeroizeOnDrop}; +use zeroize::Zeroize; /// A `DecryptionKey` provides the ability to generate a new key pair, and decrypt an /// encrypted value. @@ -30,9 +30,6 @@ where } } -#[cfg(feature = "zeroize")] -impl

ZeroizeOnDrop for DecryptionKey

where P: PkeParams {} - impl

DecryptionKey

where P: PkeParams,