cacophony-0.1.0.0: A library implementing the Noise protocol.

MaintainerJohn Galt <centromere@users.noreply.github.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Crypto.Noise.Descriptors

Contents

Description

This module contains all of the descriptors for all the handshakes specified in the protocol. The first two characters of the name represent the handshake the descriptor belongs to (NN, KN, NK, etc). The next character represents whether the descriptor is intended to be used by the Initiator or the Responder. Finally, the number indicates the step of the handshake in which the descriptor is intended to be used. Regular handshake steps begin at 1, but descriptors for pre-messages are numbered 0. The descriptors for pre-messages are intended to be passed to the handshakeState function. The (de-)serialization of pre-messages is beyond the scope of this library, but public keys can be imported/exported using the curveBytesToPub and curvePubToBytes functions.

For example, in Noise_NN, Alice passes noiseNNI1 to writeHandshakeMsg. The resulting ByteString is transmitted to Bob, where he passes the noiseNNR1 descriptor to readHandshakeMsg. This covers the -> e step of the handshake. Next, Bob passes noiseNNR2 to writeHandshakeMsgFinal and transmits the resulting ByteString to Alice. Finally, Alice passes noiseNNI2 to readHandshakeMsgFinal. This covers the <- e, dhee step of the handshake.

Synopsis

Functions

Noise_NN

Noise_KN

noiseKNI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseKNR0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_NK

noiseNKI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseNKR0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_KK

noiseKKI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseKKR0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_NE

noiseNEI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseNER0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_KE

noiseKEI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseKER0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_NX

Noise_KX

noiseKXI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseKXR0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_XN

Noise_IN

Noise_XK

noiseXKI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseXKR0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_IK

noiseIKI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseIKR0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_XE

noiseXEI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseXER0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_IE

noiseIEI0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

noiseIER0 :: (Cipher c, Curve d, Hash h) => Descriptor c d h () Source

Noise_XX

Noise_IX