Amarula.Protocol.Signal.Group.SenderChainKey (amarula v0.1.0)
View SourceRepresents a sender chain key for group encryption.
The sender chain key is used to derive message keys for sequential messages. Each iteration produces a new message key and advances the chain.
Summary
Functions
Gets the current iteration number.
Generates the next chain key in the sequence.
Gets the seed used to derive keys.
Generates a message key for the current iteration.
Creates a new SenderChainKey.
Checks if this chain key is valid.
Types
@type t() :: %Amarula.Protocol.Signal.Group.SenderChainKey{ iteration: non_neg_integer(), seed: binary() }
Functions
@spec get_iteration(t()) :: non_neg_integer()
Gets the current iteration number.
Generates the next chain key in the sequence.
Gets the seed used to derive keys.
@spec get_sender_message_key(t()) :: Amarula.Protocol.Signal.Group.SenderMessageKey.t()
Generates a message key for the current iteration.
@spec new(non_neg_integer(), binary()) :: t()
Creates a new SenderChainKey.
Checks if this chain key is valid.