pub enum DekLifecycle {
Ephemeral,
LongLived,
}Expand description
DEK lifetime relative to the process. The distinction is a nonce-reuse safety boundary for the deterministic counter nonce:
DekLifecycle::Ephemeral— theDeklives for at most the current process; the in-memory counter is authoritative for its whole life, so the deterministic counter never repeats and plain AES-256-GCM is safe.DekLifecycle::LongLived— theDekwas reconstructed from durable wrapped material (a KMSunwrap_dek) and may outlive the process. The counter resets to0on every reconstruction, so plain AES-256-GCM would reuse nonces under a fixed key (catastrophic). Such DEKs are admitted only under the nonce-misuse-resistantAes256GcmSiv.
Variants§
Ephemeral
Process-bound; counter is authoritative for the key’s whole life.
LongLived
Reconstructed from durable wrapped material; counter resets on each reconstruction, so plain AES-256-GCM is unsafe (must use SIV).
Trait Implementations§
Source§impl Clone for DekLifecycle
impl Clone for DekLifecycle
Source§fn clone(&self) -> DekLifecycle
fn clone(&self) -> DekLifecycle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DekLifecycle
impl Debug for DekLifecycle
Source§impl PartialEq for DekLifecycle
impl PartialEq for DekLifecycle
Source§fn eq(&self, other: &DekLifecycle) -> bool
fn eq(&self, other: &DekLifecycle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DekLifecycle
impl Eq for DekLifecycle
impl StructuralPartialEq for DekLifecycle
Auto Trait Implementations§
impl Freeze for DekLifecycle
impl RefUnwindSafe for DekLifecycle
impl Send for DekLifecycle
impl Sync for DekLifecycle
impl Unpin for DekLifecycle
impl UnsafeUnpin for DekLifecycle
impl UnwindSafe for DekLifecycle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.