Type Alias WrappedKey

Source
pub type WrappedKey = WrappedKeyV40;

Aliased Type§

struct WrappedKey {
    pub wrapping_key_id: u128,
    pub key: WrappedKeyBytesV32,
}

Fields§

§wrapping_key_id: u128

The identifier of the wrapping key. The identifier has meaning to whatever is doing the unwrapping.

§key: WrappedKeyBytesV32

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 From<WrappedKeyV32> for WrappedKey

Source§

fn from(from: WrappedKeyV32) -> Self

Converts to this type from the input type.
Source§

impl Clone for WrappedKeyV40

Source§

fn clone(&self) -> WrappedKeyV40

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WrappedKeyV40

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for WrappedKeyV40

Source§

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 PartialEq for WrappedKeyV40

Source§

fn eq(&self, other: &WrappedKeyV40) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for WrappedKeyV40

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TypeFingerprint for WrappedKeyV40

Source§

impl StructuralPartialEq for WrappedKeyV40