Trait sp_core::crypto::Zeroize

pub trait Zeroize {
    // Required method
    fn zeroize(&mut self);
}
Expand description

Trait to zeroize a memory buffer. Trait for securely erasing values from memory.

Required Methods§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.

Implementations on Foreign Types§

§

impl<T, N> Zeroize for GenericArray<T, N>where T: Zeroize, N: ArrayLength<T>,

§

fn zeroize(&mut self)

§

impl Zeroize for Box<str, Global>

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroI64

§

fn zeroize(&mut self)

§

impl<A, B, C, D, E, F, G, H> Zeroize for (A, B, C, D, E, F, G, H)where A: Zeroize, B: Zeroize, C: Zeroize, D: Zeroize, E: Zeroize, F: Zeroize, G: Zeroize, H: Zeroize,

§

fn zeroize(&mut self)

§

impl Zeroize for PhantomPinned

PhantomPinned is zero sized so provide a Zeroize implementation.

§

fn zeroize(&mut self)

§

impl<Z> Zeroize for PhantomData<Z>

PhantomData is always zero sized so provide a Zeroize implementation.

§

fn zeroize(&mut self)

§

impl<Z> Zeroize for Option<Z>where Z: Zeroize,

§

fn zeroize(&mut self)

§

impl<A, B, C, D, E, F, G> Zeroize for (A, B, C, D, E, F, G)where A: Zeroize, B: Zeroize, C: Zeroize, D: Zeroize, E: Zeroize, F: Zeroize, G: Zeroize,

§

fn zeroize(&mut self)

§

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.

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroI8

§

fn zeroize(&mut self)

§

impl Zeroize for __m128d

§

fn zeroize(&mut self)

§

impl<A, B, C, D> Zeroize for (A, B, C, D)where A: Zeroize, B: Zeroize, C: Zeroize, D: Zeroize,

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroI128

§

fn zeroize(&mut self)

§

impl Zeroize for str

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroU64

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroU16

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroU128

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroI16

§

fn zeroize(&mut self)

§

impl<A, B, C, D, E, F, G, H, I, J> Zeroize for (A, B, C, D, E, F, G, H, I, J)where A: Zeroize, B: Zeroize, C: Zeroize, D: Zeroize, E: Zeroize, F: Zeroize, G: Zeroize, H: Zeroize, I: Zeroize, J: Zeroize,

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroIsize

§

fn zeroize(&mut self)

§

impl Zeroize for ()

() is zero sized so provide a Zeroize implementation.

§

fn zeroize(&mut self)

§

impl<'a, Z> Zeroize for IterMut<'a, Z>where Z: Zeroize,

§

fn zeroize(&mut self)

§

impl<A, B, C> Zeroize for (A, B, C)where A: Zeroize, B: Zeroize, C: Zeroize,

§

fn zeroize(&mut self)

§

impl<A, B, C, D, E> Zeroize for (A, B, C, D, E)where A: Zeroize, B: Zeroize, C: Zeroize, D: Zeroize, E: Zeroize,

§

fn zeroize(&mut self)

§

impl<A, B> Zeroize for (A, B)where A: Zeroize, B: Zeroize,

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroI32

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroUsize

§

fn zeroize(&mut self)

§

impl<Z> Zeroize for Wrapping<Z>where Z: Zeroize,

§

fn zeroize(&mut self)

§

impl<A, B, C, D, E, F, G, H, I> Zeroize for (A, B, C, D, E, F, G, H, I)where A: Zeroize, B: Zeroize, C: Zeroize, D: Zeroize, E: Zeroize, F: Zeroize, G: Zeroize, H: Zeroize, I: Zeroize,

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroU32

§

fn zeroize(&mut self)

§

impl<Z> Zeroize for Box<[Z], Global>where Z: Zeroize,

§

fn zeroize(&mut self)

Unlike Vec, Box<[Z]> cannot reallocate, so we can be sure that we are not leaving values on the heap.

§

impl<Z> Zeroize for [Z]where Z: DefaultIsZeroes,

Impl Zeroize on slices of types that can be zeroized with Default.

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().

§

fn zeroize(&mut self)

§

impl Zeroize for String

§

fn zeroize(&mut self)

§

impl<Z, const N: usize> Zeroize for [Z; N]where Z: Zeroize,

Impl Zeroize on arrays of types that impl Zeroize.

§

fn zeroize(&mut self)

§

impl Zeroize for __m128i

§

fn zeroize(&mut self)

§

impl Zeroize for NonZeroU8

§

fn zeroize(&mut self)

§

impl<A> Zeroize for (A,)where A: Zeroize,

Generic implementation of Zeroize for tuples up to 10 parameters.

§

fn zeroize(&mut self)

§

impl Zeroize for __m128

§

fn zeroize(&mut self)

§

impl<Z> Zeroize for Vec<Z, Global>where Z: Zeroize,

§

fn zeroize(&mut self)

“Best effort” zeroization for Vec.

Ensures the entire capacity of the Vec is zeroed. Cannot ensure that previous reallocations did not leave values on the heap.

§

impl<A, B, C, D, E, F> Zeroize for (A, B, C, D, E, F)where A: Zeroize, B: Zeroize, C: Zeroize, D: Zeroize, E: Zeroize, F: Zeroize,

§

fn zeroize(&mut self)

§

impl Zeroize for Seed

§

fn zeroize(&mut self)

§

impl Zeroize for SecretKey

§

fn zeroize(&mut self)

source§

impl Zeroize for Transcript

source§

fn zeroize(&mut self)

§

impl<P> Zeroize for QuadExtField<P>where P: QuadExtConfig,

§

fn zeroize(&mut self)

§

impl<const N: usize> Zeroize for BigInt<N>

§

fn zeroize(&mut self)

§

impl<P, const N: usize> Zeroize for Fp<P, N>where P: FpConfig<N>,

§

fn zeroize(&mut self)

§

impl<P> Zeroize for CubicExtField<P>where P: CubicExtConfig,

§

fn zeroize(&mut self)

§

impl<P> Zeroize for Projective<P>where P: SWCurveConfig,

§

fn zeroize(&mut self)

§

impl<P> Zeroize for Affine<P>where P: TECurveConfig,

§

fn zeroize(&mut self)

§

impl<P> Zeroize for Affine<P>where P: SWCurveConfig,

§

fn zeroize(&mut self)

§

impl<P> Zeroize for PairingOutput<P>where P: Pairing,

§

fn zeroize(&mut self)

§

impl<P> Zeroize for Projective<P>where P: TECurveConfig,

§

fn zeroize(&mut self)

§

impl<K> Zeroize for SecretKey<K>where K: AffineRepr,

§

fn zeroize(&mut self)

§

impl<F> Zeroize for SecretScalar<F>where F: PrimeField,

§

fn zeroize(&mut self)

§

impl Zeroize for SigningKey

§

fn zeroize(&mut self)

source§

impl Zeroize for EdwardsPoint

source§

fn zeroize(&mut self)

Reset this CompressedEdwardsPoint to the identity element.

source§

impl Zeroize for RistrettoPoint

source§

fn zeroize(&mut self)

source§

impl Zeroize for CompressedEdwardsY

source§

fn zeroize(&mut self)

Reset this CompressedEdwardsY to the compressed form of the identity element.

source§

impl Zeroize for Scalar

source§

fn zeroize(&mut self)

source§

impl Zeroize for CompressedRistretto

source§

fn zeroize(&mut self)

source§

impl Zeroize for MontgomeryPoint

source§

fn zeroize(&mut self)

§

impl Zeroize for Keypair

§

fn zeroize(&mut self)

§

impl Zeroize for MiniSecretKey

§

fn zeroize(&mut self)

§

impl Zeroize for SecretKey

§

fn zeroize(&mut self)

source§

impl Zeroize for Scalar

source§

fn zeroize(&mut self)

source§

impl Zeroize for MontgomeryPoint

source§

fn zeroize(&mut self)

source§

impl Zeroize for Transcript

source§

fn zeroize(&mut self)

Implementors§

§

impl<Z> Zeroize for Zwhere Z: DefaultIsZeroes,

§

impl<Z> Zeroize for Zeroizing<Z>where Z: Zeroize,