commsec-keyexchange-0.1.1: Key agreement for commsec.

Safe HaskellNone

Network.CommSec.KeyExchange

Synopsis

Documentation

connect :: HostName -> PortNumber -> PublicKey -> PrivateKey -> IO ConnectionSource

Connect to the specified host and port, establishing a secure, authenticated connection with a party holding the public key.

accept :: PortNumber -> PublicKey -> PrivateKey -> IO ConnectionSource

Listen for and accept a connection on the host and port, establishing a secure, authenticated connection with a party holding the specified public key.

keyExchangeInit :: Socket -> PublicKey -> PrivateKey -> IO (OutContext, InContext)Source

keyExchangeInit sock them me

Act as the initiator in an authenticated key exchange using the socket sock as the communications channel, the public key them to verify the end point and the private key me to prove ourself.

keyExchangeResp :: Socket -> PublicKey -> PrivateKey -> IO (OutContext, InContext)Source

keyExchangeResp sock them me

Act as the responder in an authenticated key exchange using the socket sock as the communications channel, the public key them to verify the end point and the private key me to prove ourself.

data Connection

A connection is a secure bidirectional communication channel.

type HostName = String

Either a host name e.g., "haskell.org" or a numeric host address string consisting of a dotted decimal IPv4 address or an IPv6 address e.g., "192.168.0.1".