LibsignalProtocol (libsignal_protocol v0.1.1)

View Source

Elixir wrapper for the Signal Protocol library. Provides a clean, idiomatic interface for secure messaging.

Summary

Functions

Creates a new session for a recipient using a public key. Returns {:ok, session} on success or {:error, reason} on failure.

Creates a new session using local private key and remote public key. Returns {:ok, session} on success or {:error, reason} on failure.

Generates a new identity key pair. Returns {:ok, {public_key, signature}} on success.

Initializes the Signal Protocol library. Returns :ok on success or {:error, reason} on failure.

Functions

create_session(public_key)

@spec create_session(binary()) :: {:ok, binary()} | {:error, String.t()}

Creates a new session for a recipient using a public key. Returns {:ok, session} on success or {:error, reason} on failure.

create_session(local_private_key, remote_public_key)

@spec create_session(binary(), binary()) :: {:ok, binary()} | {:error, String.t()}

Creates a new session using local private key and remote public key. Returns {:ok, session} on success or {:error, reason} on failure.

generate_identity_key_pair()

@spec generate_identity_key_pair() ::
  {:ok, {binary(), binary()}} | {:error, String.t()}

Generates a new identity key pair. Returns {:ok, {public_key, signature}} on success.

init()

@spec init() :: :ok | {:error, String.t()}

Initializes the Signal Protocol library. Returns :ok on success or {:error, reason} on failure.

load_nif_stub()