pub struct FxfsKey {
pub wrapping_key_id: WrappingKeyId,
pub key: WrappedKeyBytes,
}
Expand description
An Fxfs encryption key wrapped in AES-256-GCM-SIV and the associated wrapping key ID. This can be provided to Crypt::unwrap_key to obtain the unwrapped key.
Fields§
§wrapping_key_id: WrappingKeyId
The identifier of the wrapping key. The identifier has meaning to whatever is doing the unwrapping.
key: WrappedKeyBytes
AES 256 requires a 512 bit key, which is made of two 256 bit keys, one for the data and one for the tweak. It is safe to use the same 256 bit key for both (see https://csrc.nist.gov/CSRC/media/Projects/Block-Cipher-Techniques/documents/BCM/Comments/XTS/follow-up_XTS_comments-Ball.pdf) which is what we do here. Since the key is wrapped with AES-GCM-SIV, there are an additional 16 bytes paid per key (so the actual key material is 32 bytes once unwrapped).
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for FxfsKey
impl<'a> Arbitrary<'a> for FxfsKey
Source§fn arbitrary(_u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(_u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given unstructured data. Read moreSource§impl<'de> Deserialize<'de> for FxfsKey
impl<'de> Deserialize<'de> for FxfsKey
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
Source§impl TypeFingerprint for FxfsKey
impl TypeFingerprint for FxfsKey
fn fingerprint() -> String
impl StructuralPartialEq for FxfsKey
Auto Trait Implementations§
impl Freeze for FxfsKey
impl RefUnwindSafe for FxfsKey
impl Send for FxfsKey
impl Sync for FxfsKey
impl Unpin for FxfsKey
impl UnwindSafe for FxfsKey
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