hs-libp2p-0.2.0.0: Haskell implementation of the libp2p networking stack
Safe HaskellNone
LanguageGHC2021

LibP2P.Noise.WebTransport

Description

Noise authentication for libp2p WebTransport sessions.

WebTransport uses Noise only on the first session stream to authenticate peer identities and bind the server's TLS certificate hashes. The resulting Noise transport cipher is deliberately discarded: subsequent WebTransport streams are protected by QUIC TLS and are not double-encrypted.

Synopsis

Documentation

performWebTransportInitiator :: KeyPair -> StreamIO -> IO (HandshakeResult, [ByteString]) Source #

Authenticate an outbound WebTransport session and return the remote peer plus the certificate hashes bound into the responder's Noise payload.

performWebTransportResponder :: KeyPair -> [ByteString] -> StreamIO -> IO HandshakeResult Source #

Authenticate an inbound WebTransport session. The supplied certificate multihashes are sent in the responder's signed Noise payload.