Noise. SymmetricState
(Noise Protocol v0.3.0)
View Source
A SymmetricState (spec §5.2): chaining key ck, handshake hash h and
an embedded Noise.CipherState.
Internal to the handshake; users interact with it through
Noise.HandshakeState. The chaining key is redacted from inspect/1.
Summary
Functions
InitializeSymmetric(protocol_name) (spec §5.2): pad or hash the name into h.
Split() (spec §5.2): {c1, c2} where c1 is initiator→responder.
Types
Functions
@spec decrypt_and_hash(t(), binary()) :: {:ok, binary(), t()} | {:error, Noise.CipherState.error()}
@spec encrypt_and_hash(t(), binary()) :: {:ok, binary(), t()} | {:error, Noise.CipherState.error()}
@spec handshake_hash(t()) :: Noise.Crypto.Hash.hash()
@spec initialize(Noise.Protocol.t()) :: t()
InitializeSymmetric(protocol_name) (spec §5.2): pad or hash the name into h.
@spec split(t()) :: {Noise.CipherState.t(), Noise.CipherState.t()}
Split() (spec §5.2): {c1, c2} where c1 is initiator→responder.