cacophony-0.10.1: A library implementing the Noise protocol.

MaintainerJohn Galt <jgalt@centromere.net>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Crypto.Noise.Internal.Handshake.Validation

Description

 
Synopsis

Documentation

type ErrorPosition = (Int, Int) Source #

(message number, token number)

Represents the location within the pattern at which an error resides, starting with zero.

data InspectionError Source #

Represents a single error associated with a pattern.

After performing a DH between a remote public key and any local private
key that is not an ephemeral private key, the local party must not send
any encrypted data (i.e. must not call ENCRYPT()) unless it has also
performed a DH between an ephemeral private key and the remote public
key.
  • DHInPreMsg -- A DH token (such as ee or es) was found in the pre-message portion of the handshake.
  • PSKInPreMsg -- A psk token was found in the pre-message portion of the handshake.
  • PSKWithoutEToken -- A psk token was used before an e token was encountered.

validateHandshakePattern :: HandshakePattern -> [InspectionError] Source #

Validates a HandshakePattern according to the rules defined in section 7.1 and 9.3 of the protocol. If no violations are found, the result will be an empty list.