pub struct Envelope {
pub credential: CredentialName,
pub context: String,
pub label: Value,
pub nonce_b64: String,
pub ciphertext_b64: String,
}Expand description
A label-carrying envelope (DR-0053 §13). The envelope records the caller’s
IFC label and unwrap restores it, so the wrap → store → unwrap roundtrip
cannot launder; AEAD associated data binds the ciphertext to
(credential, context, label) so envelopes are not swappable between
contexts even with every label intact
(models/maude/credential-wrap-carriage.maude, -UNBOUND sibling).
Fields§
§credential: CredentialNameThe wrapping credential. A different credential does not open the envelope.
context: StringThe context the envelope was produced for; unwrap under a different context is refused by AEAD, not by comparison.
label: ValueThe carried label, recorded at wrap and restored at unwrap. Opaque to the custodian: whatever the caller’s IFC layer serializes.
nonce_b64: String§ciphertext_b64: StringTrait Implementations§
Source§impl<'de> Deserialize<'de> for Envelope
impl<'de> Deserialize<'de> for Envelope
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Envelope
impl StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
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