Technical Documentation
Explore command parameters, cryptographic protocols, NAT traversal specifications, and register APIs for the peer-to-peer network.
Introduction to Rust Messenger
Rust Messenger is a lightweight, terminal-based identity client designed with absolute privacy, local security, and peer-to-peer data transport at its core. It handles public username registry allocation and establishes cryptographically secure, direct connections with other nodes.
Architectural Principles
Local-First Cryptography
Your private key is generated locally on your computer via cryptographically secure randomness. It is never transmitted, serialized over a network, or stored on a database. The registry receives only your public key to authenticate operations.
Zero-Storage Recovery
Account recovery is secured via key rotation codes generated on-the-fly and output once in plain text. The server registers only the SHA-256 hash of this recovery code. Loss of both private keys and recovery words will result in permanent loss of username ownership.
Peer-to-Peer Traversal
Chat messages do not transit through the registry. Instead, the registry acts as a dynamic STUN / ICE candidate signaling billboard. Once NAT endpoints are negotiated, communications bypass the server, routing packets directly.
Lightweight Core
Built entirely in safe Rust, using Tokio for low-overhead asynchronous execution and Reqwest for registry coordination. It operates with minimal memory footprints, making it suitable for server daemons or background terminal clients.
Key Features Flow
Identity Initialization
Generate a cryptographically secure key pair locally using Ed25519.
Registry Binding
Reserve a unique username, upload the public key, and obtain your zero-storage recovery phrase.
Peer Discovery
Look up a contact's username, verify their cryptographic fingerprint, and fetch their public key details.
UDP Hole Punching & Encrypted Session
Exchanging ICE candidates via registry signaling. Performing UDP hole punching, then running an ephemeral ECDH key exchange to encrypt conversations.