pub struct KemPrekey {
pub key_id: [u8; 16],
pub recipient: RecipientPublic,
pub not_after_unix_ms: i64,
}Expand description
A short-lived, rotated #mesh-kem recipient prekey.
The one-shot request envelope (#555) encapsulates to a published recipient
key, so — unlike streams — it cannot get forward secrecy from a per-session
ephemeral key. The standard remedy (X3DH-style) is to publish short-lived
rotated prekeys and drop the matching decapsulation key after expiry, so a
later key compromise cannot decrypt past envelopes. This type is the seam:
the publisher advertises the current recipient + key_id; the decryptor
keeps the matching RecipientKeypair only until not_after_unix_ms.
The full rotation scheduler + keystore are follow-up work (tracked under #552); this fixes the wire/identity shape that #555 binds to.
Fields§
§key_id: [u8; 16]Stable id of this prekey, bound into the envelope so the decryptor can select the matching decapsulation key.
recipient: RecipientPublicThe rotated recipient public material (suite + encap keys).
not_after_unix_ms: i64Expiry (Unix ms). The decryptor MUST drop the matching decap key after this instant, which is what gives the envelope forward secrecy across rotation.
Trait Implementations§
impl Eq for KemPrekey
impl StructuralPartialEq for KemPrekey
Auto Trait Implementations§
impl Freeze for KemPrekey
impl RefUnwindSafe for KemPrekey
impl Send for KemPrekey
impl Sync for KemPrekey
impl Unpin for KemPrekey
impl UnsafeUnpin for KemPrekey
impl UnwindSafe for KemPrekey
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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