pub struct StatelessTransportState { /* private fields */ }
Expand description

A state machine encompassing the transport phase of a Noise session, using the two CipherStates (for sending and receiving) that were spawned from the SymmetricState’s Split() method, called after a handshake has been finished.

See: http://noiseprotocol.org/noise.html#the-handshakestate-object

Implementations§

Get the remote party’s static public key, if available.

Note: will return None if either the chosen Noise pattern doesn’t necessitate a remote static key, or if the remote static key is not yet known (as can be the case in the XX pattern, for example).

Construct a message from payload (and pending handshake tokens if in handshake state), and writes it to the output buffer.

Returns the size of the written payload.

Errors

Will result in Error::Input if the size of the output exceeds the max message length in the Noise Protocol (65535 bytes).

Reads a noise message from input

Returns the size of the payload written to payload.

Errors

Will result in Error::Decrypt if the contents couldn’t be decrypted and/or the authentication tag didn’t verify.

Will result in StateProblem::Exhausted if the max nonce overflows.

Generates a new key for the egress symmetric cipher according to Section 4.2 of the Noise Specification. Synchronizing timing of rekey between initiator and responder is the responsibility of the application, as described in Section 11.3 of the Noise Specification.

Generates a new key for the ingress symmetric cipher according to Section 4.2 of the Noise Specification. Synchronizing timing of rekey between initiator and responder is the responsibility of the application, as described in Section 11.3 of the Noise Specification.

Set a new key for the one or both of the initiator-egress and responder-egress symmetric ciphers.

Set a new key for the initiator-egress symmetric cipher.

Set a new key for the responder-egress symmetric cipher.

Check if this session was started with the “initiator” role.

Trait Implementations§

Formats the value using the given formatter. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.