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