Safe Haskell | None |
---|
This module provides an authenticated key exchange using the station to station protocol and RSA signatures for authentication.
- keyExchangeInit :: Socket -> [PublicKey] -> PrivateKey -> IO (Maybe (PublicKey, OutContext, InContext))
- keyExchangeResp :: Socket -> [PublicKey] -> PrivateKey -> IO (Maybe (PublicKey, OutContext, InContext))
Documentation
keyExchangeInit :: Socket -> [PublicKey] -> PrivateKey -> IO (Maybe (PublicKey, OutContext, InContext))Source
keyExchangeInit sock pubKeys me
Act as the initiator in an authenticated key exchange using the socket
sock
as the communications channel, the public keys pubKeys
to
verify the end point and the private key me
to prove ourself.
If the responder uses one of the assocated public keys for
authentication, it will return the tuple of the public key used
and the contexts created. If the responder does not use one of
these keys then Nothing
is returned.
The current design assumes the responder accepts our signature - the responder could reject our signature silently and this funcition would complete successfully.
keyExchangeResp :: Socket -> [PublicKey] -> PrivateKey -> IO (Maybe (PublicKey, OutContext, InContext))Source
keyExchangeResp sock pubKeys me
Act as the responder in an authenticated key exchange using the socket
sock
as the communications channel, the public keys pubKeys
to
verify the end point and the private key me
to prove ourself.
If the initiator uses one of the assocated public keys for
authentication, it will return the tuple of the public key used
and the contexts created. If the initiator does not use one of
these keys then Nothing
is returned.