Crypto Protocol Specification

Classification: Technical · Last updated: April 2026

SecureChat's entire cryptographic stack runs on a single library: lazysodium-android (libsodium wrapper for Android). No AES-GCM. No BouncyCastle. No custom crypto. One audited library for all operations across the StealthX platform.

XChaCha20-Poly1305 — Symmetric Encryption

Symmetric Cipher

Algorithm

XChaCha20-Poly1305 AEAD (Authenticated Encryption with Associated Data). All message content, attachments, and metadata are encrypted with this cipher before leaving the device.

X25519 ECDH — Key Exchange

Key Exchange

Algorithm

X25519 Elliptic-Curve Diffie-Hellman for ephemeral key agreement. Each session generates fresh key pairs so that compromise of one session does not affect others.

Double Ratchet — Forward Secrecy

Ratchet Protocol

Algorithm

Double Ratchet protocol combining a Diffie-Hellman ratchet with a symmetric-key ratchet. Every message uses a unique key. Compromise of a single message key cannot decrypt past or future messages.

Argon2id — Key Derivation

KDF

Algorithm

Argon2id password-based key derivation function. Used to derive encryption keys from user passwords for local database encryption and backup protection.

Ed25519 — Digital Signatures

Signing

Algorithm

Ed25519 for identity signing. Each device generates an Ed25519 key pair that signs key bundles, identity proofs, and Kaspa-anchored public keys.

Android Keystore — Hardware Key Storage

Hardware Security

Platform

Long-term private keys are stored in Android Keystore hardware. Keys are generated inside the secure element and never leave the chip — not even the OS can extract them.

Design Principles

Philosophy

Single Library Policy

The entire SecureChat crypto stack uses one library: lazysodium-android. This is the same library used by SecureCall and Chameleon across the StealthX platform. One audited stack means fewer attack surfaces, consistent behavior, and simpler security reviews.