pub struct RotateableKeySet { /* private fields */ }Expand description
A set of keys where a given DownstreamKey is protected by an encrypted public/private
key-pair. The DownstreamKey is used to encrypt/decrypt data, while the public/private key-pair
is used to rotate the DownstreamKey.
The PrivateKey is protected by an UpstreamKey, such as a DeviceKey, or PrfKey,
and the PublicKey is protected by the DownstreamKey. This setup allows:
- Access to
DownstreamKeyby knowing theUpstreamKey - Rotation to a
NewDownstreamKeyby knowing the currentDownstreamKey, without needing access to theUpstreamKey
Implementations§
Source§impl RotateableKeySet
impl RotateableKeySet
Sourcepub fn new<Ids: KeyIds>(
ctx: &KeyStoreContext<'_, Ids>,
upstream_key: &SymmetricCryptoKey,
downstream_key_id: Ids::Symmetric,
) -> Result<Self, CryptoError>
pub fn new<Ids: KeyIds>( ctx: &KeyStoreContext<'_, Ids>, upstream_key: &SymmetricCryptoKey, downstream_key_id: Ids::Symmetric, ) -> Result<Self, CryptoError>
Create a set of keys to allow access to the downstream key via the provided upstream key while allowing the downstream key to be rotated.
Trait Implementations§
Source§impl Debug for RotateableKeySet
impl Debug for RotateableKeySet
Source§impl<'de> Deserialize<'de> for RotateableKeySet
impl<'de> Deserialize<'de> for RotateableKeySet
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
Auto Trait Implementations§
impl Freeze for RotateableKeySet
impl RefUnwindSafe for RotateableKeySet
impl Send for RotateableKeySet
impl Sync for RotateableKeySet
impl Unpin for RotateableKeySet
impl UnwindSafe for RotateableKeySet
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
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>
Converts
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>
Converts
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