| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
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
- performWebTransportInitiator :: KeyPair -> StreamIO -> IO (HandshakeResult, [ByteString])
- performWebTransportResponder :: KeyPair -> [ByteString] -> StreamIO -> IO HandshakeResult
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.