Amarula.Protocol.Signal.Group.SenderMessageKey (amarula v0.1.0)
View SourceRepresents a sender message key for group encryption.
Each message in a group uses a unique key derived from the sender chain key. This key is used for both encryption and decryption of individual messages.
Summary
Functions
Gets the cipher key for encryption/decryption.
Gets the iteration number.
Gets the IV for encryption/decryption.
Gets the seed used to derive this key.
Creates a new SenderMessageKey from iteration and seed.
Types
@type t() :: %Amarula.Protocol.Signal.Group.SenderMessageKey{ cipher_key: binary(), iteration: non_neg_integer(), iv: binary(), seed: binary() }
Functions
Gets the cipher key for encryption/decryption.
@spec get_iteration(t()) :: non_neg_integer()
Gets the iteration number.
Gets the IV for encryption/decryption.
Gets the seed used to derive this key.
@spec new(non_neg_integer(), binary()) :: t()
Creates a new SenderMessageKey from iteration and seed.
Mirrors libsignal sender-message-key.ts: HKDF(seed, zeros32, "WhisperGroup") → derivative blocks D0, D1; iv = D0[0..15], cipher_key = D0[16..31] ++ D1[0..15].