pub struct WrappedDek {
pub dek_generation: u64,
pub wraps: HashMap<String, Vec<u8>>,
}Expand description
The cluster data-encryption key (DEK), wrapped per-node so each member can decrypt without ever holding a shared cluster-wide private key.
The DEK itself is never stored anywhere; only the per-node sealed-box wraps live in Raft. A node decrypts its own wrap on startup using its node X25519 private key, and holds the unwrapped DEK in zeroized memory.
Generation increments on every rotation (e.g. node revocation, scheduled
rotation, suspected compromise). Every ReplicatedSecret records the
dek_generation it was encrypted under so re-encrypts can be batched.
Fields§
§dek_generation: u64Monotonically increasing generation counter.
wraps: HashMap<String, Vec<u8>>Map from node_id to that node’s sealed-box-wrapped copy of the DEK.
A node missing from this map cannot decrypt any secret encrypted
under this generation and must be re-wrapped via RegisterNode (or
through a RotateDek that includes it).
Trait Implementations§
Source§impl Clone for WrappedDek
impl Clone for WrappedDek
Source§fn clone(&self) -> WrappedDek
fn clone(&self) -> WrappedDek
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more