Expand description
Signal Protocol integration for Radix Relay
This crate provides a bridge between Radix Relay’s C++ transport layer and the official Signal Protocol Rust implementation for end-to-end encryption.
Re-exports§
pub use key_rotation::cleanup_expired_kyber_pre_keys;pub use key_rotation::cleanup_expired_signed_pre_keys;pub use key_rotation::consume_pre_key;pub use key_rotation::kyber_pre_key_needs_rotation;pub use key_rotation::replenish_pre_keys;pub use key_rotation::rotate_kyber_pre_key;pub use key_rotation::rotate_signed_pre_key;pub use key_rotation::signed_pre_key_needs_rotation;pub use key_rotation::GRACE_PERIOD_SECS;pub use key_rotation::MIN_PRE_KEY_COUNT;pub use key_rotation::REPLENISH_COUNT;pub use key_rotation::ROTATION_INTERVAL_SECS;pub use message_history::Conversation;pub use message_history::DeliveryStatus;pub use message_history::MessageDirection;pub use message_history::MessageHistory;pub use message_history::MessageType;pub use message_history::StoredMessage;pub use memory_storage::MemoryStorage;pub use sqlite_storage::SqliteStorage;pub use storage_trait::ExtendedIdentityStore;pub use storage_trait::ExtendedKyberPreKeyStore;pub use storage_trait::ExtendedPreKeyStore;pub use storage_trait::ExtendedSessionStore;pub use storage_trait::ExtendedSignedPreKeyStore;pub use storage_trait::ExtendedStorageOps;pub use storage_trait::SignalStorageContainer;
Modules§
- key_
rotation - Key rotation functionality for Signal Protocol keys
- memory_
storage - In-memory storage implementation for libsignal
- message_
history - Message history storage and retrieval
- sqlite_
storage - SQLite storage implementation for libsignal
- storage_
trait - Storage trait definitions for libsignal
Structs§
- Contact
Info - Information about a known contact/peer
- Contact
Manager - Manages contact database operations separate from Signal Protocol
- Decryption
Result - Result of decrypting an incoming message
- KeyMaintenance
Result - Result of key maintenance operations indicating which keys were rotated/replenished
- Nostr
Identity - Nostr identity derivation utilities
- Signal
Bridge - Main bridge between C++ and Rust Signal Protocol implementation
Enums§
- Signal
Bridge Error - Errors that can occur in the Signal Protocol bridge
Functions§
- add_
contact_ and_ establish_ session - Adds a contact from a bundle and establishes a session
- add_
contact_ and_ establish_ session_ from_ base64 - Adds a contact from a base64-encoded bundle and establishes a session
- assign_
contact_ alias - Assigns an alias to a contact
- clear_
all_ sessions - Clears all Signal Protocol sessions
- clear_
peer_ session - Clears the Signal Protocol session with a specific peer
- create_
and_ sign_ encrypted_ message - Creates and signs a Nostr encrypted message event
- create_
subscription_ for_ self - Creates a Nostr subscription filter for messages to this node
- decrypt_
message - Decrypts an incoming Signal Protocol message
- delete_
conversation - Deletes an entire conversation and all its messages
- delete_
message - Deletes a message by ID
- encrypt_
message - Encrypts a message for a peer using Signal Protocol
- establish_
session - Establishes a Signal Protocol session from a prekey bundle
- extract_
rdx_ from_ bundle - Extracts RDX fingerprint from a prekey bundle without adding contact
- extract_
rdx_ from_ bundle_ base64 - Extracts RDX fingerprint from a base64-encoded prekey bundle
- generate_
empty_ bundle_ announcement - Generates an empty bundle announcement for unpublishing
- generate_
node_ fingerprint - Returns this node’s RDX fingerprint
- generate_
pre_ key_ bundle - Generates a new prekey bundle with metadata for publishing
- generate_
prekey_ bundle_ announcement - Generates a signed prekey bundle announcement
- get_
conversation_ messages - Retrieves messages for a conversation with pagination
- get_
conversations - Retrieves all conversations ordered by recent activity
- get_
unread_ count - Gets the unread message count for a conversation
- list_
contacts - Lists all known contacts
- lookup_
contact - Looks up a contact by RDX fingerprint or alias
- mark_
conversation_ read - Marks a conversation as read (clears unread count)
- new_
signal_ bridge - Creates a new Signal Protocol bridge with SQLite storage
- perform_
key_ maintenance - Performs periodic key rotation and cleanup
- record_
published_ bundle - Records a published bundle to track used keys
- reset_
identity - Resets the node’s Signal Protocol identity (generates new identity key)
- sign_
nostr_ event - Signs a Nostr event with node’s private key
- update_
last_ message_ timestamp - Updates the timestamp of the last received message