Maintainer | John Galt <jgalt@centromere.net> |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
Documentation
data ExceptionKeyType Source #
Represents the type of key that may be associated with an exception.
data NoiseException Source #
Represents the various exceptions which can be thrown.
StaticKeyOverwrite
occurs when a static key is transmitted by the remote party, but a remote static key has already been set inHandshakeOpts
.InvalidKey
occurs when a key transmitted by the remote party is successfully decrypted but otherwise invalid.KeyMissing
occurs when a required key has not been provided toHandshakeOpts
. The keys which are required depend on the handshake pattern chosen.InvalidPattern
occurs when a handshake pattern uses an improper token. This can occur if a user-definedHandshakePattern
uses any token other thane
ors
in a pre-message pattern.DecryptionError
occurs when any data fails to decrypt for any reason. This usually occurs if the authentication tag is invalid.MessageLimitReached
occurs if the user attempts to send or receive more than2^64 - 1
messages. This is needed because nonces are 8-bytes (64 bits), and doing so would cause catastrophic key re-use.