pub struct TransportState { /* private fields */ }Expand description
A Noise transport session: one ciphertext per message.
The nonce advances with every message in each direction; a repeated or reordered ciphertext fails authentication. Payloads are not fragmented at this layer, so a caller that needs to send more than a single Noise message can carry has to split the data itself.
Implementations§
Source§impl TransportState
impl TransportState
Sourcepub fn handshake_hash(&self) -> &[u8; 32]
pub fn handshake_hash(&self) -> &[u8; 32]
Returns the handshake hash h of the handshake these keys came from.
Noise finalises h when the second handshake message is processed, and nothing after that
changes it. Sendspin uses it once: a re-handshake
mixes the previous handshake’s h in as its prologue, so a second handshake that reuses
these keys must be built with this value. It is a transcript hash, not key material, but it
must still never be logged.
Auto Trait Implementations§
impl !RefUnwindSafe for TransportState
impl !UnwindSafe for TransportState
impl Forget for TransportState
impl Freeze for TransportState
impl Move for TransportState
impl Send for TransportState
impl Sync for TransportState
impl Unpin for TransportState
impl UnsafeUnpin for TransportState
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