logo
pub fn rt15_initiator<T, C>(
    io: T,
    session: Result<HandshakeState, NoiseError>,
    identity: KeypairIdentity,
    identity_x: IdentityExchange,
    legacy: LegacyConfig
) -> Handshake<T, C>Notable traits for Handshake<T, C>impl<T, C> Future for Handshake<T, C> type Output = Result<(RemoteIdentity<C>, NoiseOutput<T>), NoiseError>; where
    T: 'static + AsyncWrite + AsyncRead + Unpin + Send,
    C: Protocol<C> + AsRef<[u8]>, 
Expand description

Creates an authenticated Noise handshake for the initiator of a 1.5-roundtrip (3 message) handshake pattern.

Subject to the chosen IdentityExchange, this message sequence expects the remote to identify itself in the second message payload and identifies the local node to the remote in the third message payload. The first (unencrypted) message payload is always empty.

This message sequence is suitable for authenticated 3-message Noise handshake patterns where the static keys of the responder and initiator are either known (i.e. appear in the pre-message pattern) or are sent with the second and third message, respectively (e.g. XX).

initiator --{}--> responder
initiator <-{id}- responder
initiator -{id}-> responder