SignalProtocol.PreKeyBundle (libsignal_protocol v0.1.1)
View SourceHandles the creation and processing of pre-key bundles for the Signal Protocol.
Pre-key bundles are used to establish initial sessions between users in an asynchronous manner.
Summary
Functions
Creates a new pre-key bundle with the given components.
Parses a pre-key bundle from its binary representation.
Verifies the signature of a pre-key bundle.
Functions
Creates a new pre-key bundle with the given components.
Parameters
registration_id- The registration ID of the useridentity_key- The user's identity keypre_key- A pre-key tuple{key_id, public_key}signed_pre_key- A signed pre-key tuple{key_id, public_key, signature}base_key- The base key for the X3DH key agreement
Returns {:ok, bundle} on success, where bundle is a binary containing
the serialized pre-key bundle.
Parses a pre-key bundle from its binary representation.
Returns {:ok, bundle} on success, where bundle is a map containing
the bundle components.
Verifies the signature of a pre-key bundle.
Returns :ok if the signature is valid, {:error, reason} otherwise.