pub trait Zeroize {
// Required method
fn zeroize(&mut self);
}Expand description
Trait for securely erasing values from memory.
Required Methods§
Implementations on Foreign Types§
Source§impl Zeroize for CompressedEdwardsY
Available on crate feature zeroize only.
impl Zeroize for CompressedEdwardsY
zeroize only.Source§impl Zeroize for EdwardsPoint
Available on crate feature zeroize only.
impl Zeroize for EdwardsPoint
zeroize only.Source§impl Zeroize for MontgomeryPoint
Available on crate feature zeroize only.
impl Zeroize for MontgomeryPoint
zeroize only.Source§impl Zeroize for CompressedRistretto
Available on crate feature zeroize only.
impl Zeroize for CompressedRistretto
zeroize only.Source§impl Zeroize for RistrettoPoint
Available on crate feature zeroize only.
impl Zeroize for RistrettoPoint
zeroize only.Source§impl Zeroize for SecretKey
impl Zeroize for SecretKey
Source§fn zeroize(&mut self)
fn zeroize(&mut self)
Securely clears the shared secret from memory.
§Security
This implementation follows the same security methodology as the zeroize crate to ensure
that sensitive cryptographic material is reliably cleared from memory:
- Volatile writes: Uses
ptr::write_volatileto prevent dead store elimination and other compiler optimizations that might remove the zeroing operation. - Memory ordering: Includes a sequentially consistent compiler fence (
SeqCst) to prevent instruction reordering that could expose the secret data after this function returns.
Source§fn zeroize(&mut self)
fn zeroize(&mut self)
Securely clears the shared secret from memory.
§Security
This implementation follows the same security methodology as the zeroize crate to ensure
that sensitive cryptographic material is reliably cleared from memory:
- Volatile writes: Uses
ptr::write_volatileto prevent dead store elimination and other compiler optimizations that might remove the zeroing operation. - Memory ordering: Includes a sequentially consistent compiler fence (
SeqCst) to prevent instruction reordering that could expose the secret data after this function returns.
Source§fn zeroize(&mut self)
fn zeroize(&mut self)
Securely clears the shared secret from memory.
§Security
This implementation follows the same security methodology as the zeroize crate to ensure
that sensitive cryptographic material is reliably cleared from memory:
- Volatile writes: Uses
ptr::write_volatileto prevent dead store elimination and other compiler optimizations that might remove the zeroing operation. - Memory ordering: Includes a sequentially consistent compiler fence (
SeqCst) to prevent instruction reordering that could expose the secret data after this function returns.
Source§impl<A, B, C, D> Zeroize for (A, B, C, D)
impl<A, B, C, D> Zeroize for (A, B, C, D)
Source§impl<A, B, C, D, E> Zeroize for (A, B, C, D, E)
impl<A, B, C, D, E> Zeroize for (A, B, C, D, E)
Source§impl<A, B, C, D, E, F> Zeroize for (A, B, C, D, E, F)
impl<A, B, C, D, E, F> Zeroize for (A, B, C, D, E, F)
Source§impl<A, B, C, D, E, F, G> Zeroize for (A, B, C, D, E, F, G)
impl<A, B, C, D, E, F, G> Zeroize for (A, B, C, D, E, F, G)
Source§impl<A, B, C, D, E, F, G, H> Zeroize for (A, B, C, D, E, F, G, H)
impl<A, B, C, D, E, F, G, H> Zeroize for (A, B, C, D, E, F, G, H)
Source§impl<A, B, C, D, E, F, G, H, I> Zeroize for (A, B, C, D, E, F, G, H, I)
impl<A, B, C, D, E, F, G, H, I> Zeroize for (A, B, C, D, E, F, G, H, I)
Source§impl<A, B, C, D, E, F, G, H, I, J> Zeroize for (A, B, C, D, E, F, G, H, I, J)
impl<A, B, C, D, E, F, G, H, I, J> Zeroize for (A, B, C, D, E, F, G, H, I, J)
Source§impl<C> Zeroize for EphemeralSecret<C>where
C: CurveArithmetic,
impl<C> Zeroize for EphemeralSecret<C>where
C: CurveArithmetic,
Source§impl<C> Zeroize for NonZeroScalar<C>where
C: CurveArithmetic,
impl<C> Zeroize for NonZeroScalar<C>where
C: CurveArithmetic,
Source§impl<Size> Zeroize for EncodedPoint<Size>where
Size: ModulusSize,
Available on crate feature zeroize only.
impl<Size> Zeroize for EncodedPoint<Size>where
Size: ModulusSize,
zeroize only.Source§impl<T, N> Zeroize for GenericArray<T, N>where
T: Zeroize,
N: ArrayLength<T>,
impl<T, N> Zeroize for GenericArray<T, N>where
T: Zeroize,
N: ArrayLength<T>,
Source§impl<Z> Zeroize for [Z]where
Z: DefaultIsZeroes,
impl<Z> Zeroize for [Z]where
Z: DefaultIsZeroes,
This impl can eventually be optimized using an memset intrinsic,
such as core::intrinsics::volatile_set_memory. For that reason the
blanket impl on slices is bounded by DefaultIsZeroes.
To zeroize a mut slice of Z: Zeroize which does not impl
DefaultIsZeroes, call iter_mut().zeroize().
Source§impl<Z> Zeroize for PhantomData<Z>
PhantomData is always zero sized so provide a Zeroize implementation.
impl<Z> Zeroize for PhantomData<Z>
PhantomData is always zero sized so provide a Zeroize implementation.
Source§impl<Z> Zeroize for MaybeUninit<Z>
Impl Zeroize on MaybeUninit types.
impl<Z> Zeroize for MaybeUninit<Z>
Impl Zeroize on MaybeUninit types.
This fills the memory with zeroes.
Note that this ignore invariants that Z might have, because
MaybeUninit removes all invariants.
Source§impl<Z> Zeroize for [MaybeUninit<Z>]
Impl Zeroize on slices of MaybeUninit types.
impl<Z> Zeroize for [MaybeUninit<Z>]
Impl Zeroize on slices of MaybeUninit types.
This impl can eventually be optimized using an memset intrinsic,
such as core::intrinsics::volatile_set_memory.
This fills the slice with zeroes.
Note that this ignore invariants that Z might have, because
MaybeUninit removes all invariants.
Source§impl<const LIMBS: usize> Zeroize for DynResidue<LIMBS>
Available on crate feature zeroize only.NOTE: this does not zeroize the parameters, in order to maintain some form of type consistency
impl<const LIMBS: usize> Zeroize for DynResidue<LIMBS>
zeroize only.NOTE: this does not zeroize the parameters, in order to maintain some form of type consistency