pub struct VolumeEncryption {
pub version: u8,
pub algorithm: String,
pub key_b64: String,
}Expand description
Wire-format request to encrypt the workload’s data volume.
The key_b64 is a 32-byte symmetric key, base64-encoded
(URL-safe, no padding). Provider feeds it to cryptsetup luksFormat as a passphrase (raw bytes, no hashing on top).
algorithm is a forward-compat tag so a future schema bump can
introduce e.g. xchacha20-poly1305 or hardware-attested keying
without breaking existing requests. v1 supports luks2-aes-xts
only; providers reject unknown algorithms with a structured
UnsupportedVolumeEncryption error so old providers seeing a
future-algorithm request fail loud rather than silently fall
back to plain volumes.
Fields§
§version: u8Schema version. v1 = LUKS2 + AES-XTS-Plain64, key supplied directly. Bump for new key-derivation flows (e.g. attested key release from a TPM / TEE).
algorithm: StringAlgorithm tag. v1 only accepts luks2-aes-xts.
key_b64: String32-byte key, base64 (URL-safe, unpadded). Consumer derives from a stable secret + workload_id so the same key recurs on respawn / standby promotion (the standby decrypts the checkpoint with it).
Implementations§
Source§impl VolumeEncryption
impl VolumeEncryption
Sourcepub const ALGORITHM_V1: &'static str = "luks2-aes-xts"
pub const ALGORITHM_V1: &'static str = "luks2-aes-xts"
Algorithm tag for the v1 wire format. Spelled out so callers don’t need to know the LUKS internals.
pub const VERSION_V1: u8 = 1
Trait Implementations§
Source§impl Clone for VolumeEncryption
impl Clone for VolumeEncryption
Source§fn clone(&self) -> VolumeEncryption
fn clone(&self) -> VolumeEncryption
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 VolumeEncryption
impl Debug for VolumeEncryption
Source§impl<'de> Deserialize<'de> for VolumeEncryption
impl<'de> Deserialize<'de> for VolumeEncryption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for VolumeEncryption
impl PartialEq for VolumeEncryption
Source§fn eq(&self, other: &VolumeEncryption) -> bool
fn eq(&self, other: &VolumeEncryption) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for VolumeEncryption
impl Serialize for VolumeEncryption
impl Eq for VolumeEncryption
impl StructuralPartialEq for VolumeEncryption
Auto Trait Implementations§
impl Freeze for VolumeEncryption
impl RefUnwindSafe for VolumeEncryption
impl Send for VolumeEncryption
impl Sync for VolumeEncryption
impl Unpin for VolumeEncryption
impl UnsafeUnpin for VolumeEncryption
impl UnwindSafe for VolumeEncryption
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more