pub struct StorageKey {
pub epoch: u32,
pub kek_epoch: u32,
pub algorithm: StorageAlgorithm,
pub wrapped_dek: Vec<u8>,
pub created_at_unix_ms: i64,
pub opened_at_t: u64,
pub state: StorageKeyState,
pub live_objects: u64,
}Expand description
One storage data key, wrapped under the manifest’s KEK.
Fields§
§epoch: u32Epoch this key encrypts under. Stored in every object it produces.
kek_epoch: u32KEK epoch the material below is wrapped under. Recorded because a KEK rotation retires a KEK epoch while the DEK epoch is unchanged.
algorithm: StorageAlgorithmAEAD suite this epoch is used with.
wrapped_dek: Vec<u8>Wrapped data key. Never usable without the KEK.
created_at_unix_ms: i64When the epoch was opened, as Unix milliseconds.
opened_at_t: u64Transaction number the epoch was opened at.
This is the log-record nonce budget’s meter. Log records use AES-256-GCM
with a random nonce, so the number sealed under one key must stay well
below LOG_RECORDS_PER_EPOCH_LIMIT — and that number is exactly the
span of t the epoch covers, because the log seals one record per
transaction. Recording where an epoch started therefore measures its
budget with no counter to maintain and no write amplification: the next
epoch’s opened_at_t (or the current basis, for the active epoch) ends
the span. See KeyManifest::log_records_sealed.
state: StorageKeyStateWhere the epoch sits in its lifecycle.
live_objects: u64Live objects carrying this epoch as of the last mark pass. An epoch
retires only at zero; corium keys status prints it so a drain is a
number rather than a guess. This counts stored objects for GC drain, not
records sealed — the nonce budget is opened_at_t’s job.
Trait Implementations§
Source§impl Clone for StorageKey
impl Clone for StorageKey
Source§fn clone(&self) -> StorageKey
fn clone(&self) -> StorageKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StorageKey
impl Debug for StorageKey
impl Eq for StorageKey
Source§impl PartialEq for StorageKey
impl PartialEq for StorageKey
impl StructuralPartialEq for StorageKey
Auto Trait Implementations§
impl Freeze for StorageKey
impl RefUnwindSafe for StorageKey
impl Send for StorageKey
impl Sync for StorageKey
impl Unpin for StorageKey
impl UnsafeUnpin for StorageKey
impl UnwindSafe for StorageKey
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
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
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request