[][src]Function libp2p_noise::handshake::rt1_responder

Important traits for Handshake<T, C>
pub fn rt1_responder<T, C>(
    io: T,
    session: Result<HandshakeState, NoiseError>,
    identity: KeypairIdentity,
    identity_x: IdentityExchange
) -> Handshake<T, C> where
    T: AsyncWrite + AsyncRead + Send + Unpin + 'static,
    C: Protocol<C> + AsRef<[u8]>, 

Creates an authenticated Noise handshake for the responder of a single roundtrip (2 message) handshake pattern.

Subject to the chosen IdentityExchange, this message sequence expects the remote to identify itself in the first message payload (i.e. unencrypted) and identifies the local node to the remote in the second message payload.

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

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