pub struct SessionKeys { /* private fields */ }Implementations§
Source§impl SessionKeys
impl SessionKeys
pub fn derive(shared: &[u8], transcript: [u8; 32]) -> Self
Sourcepub fn hybrid(
&self,
kem_public: &[u8],
kem_ciphertext: &[u8],
kem_shared: &[u8; 32],
) -> Self
pub fn hybrid( &self, kem_public: &[u8], kem_ciphertext: &[u8], kem_shared: &[u8; 32], ) -> Self
The keys the identity travels under: SPAKE2’s secret and ML-KEM’s together, bound to the encapsulation key and ciphertext. Reading the bundle takes breaking both.
Sourcepub fn sas(&self) -> String
pub fn sas(&self) -> String
The number both screens agree on: shown on the receiver, typed on the sender.
Sourcepub fn sas_matches(&self, typed: &str) -> bool
pub fn sas_matches(&self, typed: &str) -> bool
Whether typed is the number, compared in constant time. Only its digits count, so a
keypad’s “123-456” or “123 456” reads the same.
pub fn seal(&self, dir: Dir, kind: Sealed, plain: &[u8]) -> Vec<u8> ⓘ
pub fn open( &self, dir: Dir, kind: Sealed, sealed: &[u8], ) -> Result<Zeroizing<Vec<u8>>, ()>
Trait Implementations§
Source§impl Drop for SessionKeys
impl Drop for SessionKeys
Auto Trait Implementations§
impl Forget for SessionKeys
impl Freeze for SessionKeys
impl Move for SessionKeys
impl RefUnwindSafe for SessionKeys
impl Send for SessionKeys
impl Sync for SessionKeys
impl Unpin for SessionKeys
impl UnsafeUnpin for SessionKeys
impl UnwindSafe for SessionKeys
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