Secure wallet communication with dependable delivery

How MumbleChat Protocol Works

Native RamaPay messaging on Ramestta with strong encryption, wallet-based authentication, protected local storage, message-request approval, self-destruct controls, and dependable relay-assisted delivery.

πŸ” Trusted encryption
⛓️ Wallet identity
πŸ›‘οΈ Wallet Auth
πŸ—„οΈ Protected storage

Protocol Architecture

A high-level view of how identity, private messaging, relay participation, and MCT utility work together.

Decentralized P2P Network Architecture

Core Platform Layers

MumbleChat is designed around a few clear layers so identity, delivery, and token utility can work together cleanly:

Wallet Identity β€” lets users connect through their wallet instead of phone-number identity.
Private Messaging β€” keeps conversations secure and user-controlled.
Relay Participation β€” helps maintain dependable delivery across the network.
MCT Utility β€” supports staking, rewards, and broader ecosystem participation.

πŸ“ Wallet identity πŸ“‘ Relay participation πŸ” Secure delivery πŸͺ™ MCT Utility

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   MUMBLECHAT PROTOCOL V4.0 STACK                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                          β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚   β”‚   RamaPay   β”‚     β”‚   Chrome    β”‚     β”‚   Desktop   β”‚   CLIENTS    β”‚
β”‚   β”‚   Android   β”‚     β”‚  Extension  β”‚     β”‚ Relay Node  β”‚               β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚          β”‚                   β”‚                   β”‚                       β”‚
β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β”‚                              β–Ό                                           β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚   β”‚                MumbleChat Core Layer (Hardened)                β”‚      β”‚
β”‚   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚      β”‚
β”‚   β”‚  β”‚ BouncyCastleβ”‚  β”‚ MessageCodecβ”‚ β”‚ ChatServiceβ”‚              β”‚      β”‚
β”‚   β”‚  β”‚ X25519+GCM β”‚  β”‚ Binary Wire β”‚  β”‚ Orchestratorβ”‚            β”‚      β”‚
β”‚   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚      β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                              β”‚                                           β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚   β”‚              Security Layer (Production Hardened)              β”‚      β”‚
β”‚   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚      β”‚
β”‚   β”‚  β”‚ Wallet-Signβ”‚  β”‚  SQLCipher  β”‚  β”‚ Rate       β”‚              β”‚      β”‚
β”‚   β”‚  β”‚ Auth (ECDSA)β”‚ β”‚ Encrypted DBβ”‚  β”‚ Limiter    β”‚              β”‚      β”‚
β”‚   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚      β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                              β”‚                                           β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚   β”‚              V8 Smart Contracts (Ramestta Mainnet)             β”‚      β”‚
β”‚   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚      β”‚
β”‚   β”‚  β”‚MCT Token β”‚ β”‚Registry  β”‚ β”‚RelayMgr  β”‚ β”‚ProofVeri β”‚        β”‚      β”‚
β”‚   β”‚  β”‚  V8      β”‚ β”‚  V7      β”‚ β”‚  V13     β”‚ β”‚  V2      β”‚        β”‚      β”‚
β”‚   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚      β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                

πŸ”‘ On-Chain Identity

Your wallet address is your identity. Public keys stored immutably on blockchain. No emails. No phone numbers. Self-sovereign.

Registration Flow

// 1. Generate X25519 keypair (BouncyCastle)
val keyPair = X25519KeyPairGenerator().generateKeyPair()

// 2. Sign with wallet (ECDSA authentication)
val signature = wallet.signMessage(publicKey)

// 3. Store public key on-chain
registry.register(
    publicKeyX: keyPair.publicKey,
    displayName: "alice.rama"
)

// 4. Identity now discoverable on-chain
// Anyone can lookup by wallet address
                    

Identity Struct (Solidity)

struct Identity {
    bytes32 publicKeyX;      // X25519 public key
    bytes32 publicKeyY;      // Reserved
    uint256 registeredAt;    // Timestamp
    uint256 lastUpdated;     // Key rotation
    bool isActive;           // Active status
    string displayName;      // Optional name
}
                    

Key Features

πŸ” Self-Sovereign

You own your identity. No platform can ban or censor you.

πŸ”„ Key Rotation

Update your public key anytime via updatePublicKey().

πŸ” Discoverable

Anyone can lookup your public key by wallet address.

πŸ” End-to-End Encryption

Real BouncyCastle X25519 ECDH + AES-256-GCM. Production-grade, audited security.

End-to-end encryption

How E2E Encryption Works

1. Lookup recipient's X25519 public key from blockchain
2. Generate ephemeral X25519 keypair (forward secrecy)
3. Derive shared secret via ECDH agreement
4. Derive AES key using HKDF with unique salt
5. Encrypt with AES-256-GCM (authenticated encryption)
6. Sign with Ed25519 for message authenticity
7. Package: [ephemeral key | nonce | ciphertext | auth tag]

πŸ”‘ Ephemeral Keys πŸ›‘οΈ Forward Secrecy ✍️ Ed25519 Signed
πŸ”‘

X25519 ECDH

Elliptic-curve Diffie-Hellman using BouncyCastle library. Each message uses a unique ephemeral key for perfect forward secrecy.

πŸ›‘οΈ

AES-256-GCM

Authenticated encryption with 256-bit key. Provides confidentiality AND integrity verification in one operation.

πŸ”’

SQLCipher Storage

All messages encrypted at rest with SQLCipher. Even physical device access can't compromise your chat history without your wallet key.

πŸ“¨ Message Protocol

How messages are structured, routed, and delivered in the MumbleChat network.

Message Structure (Binary Wire Format)

data class MumbleChatMessage(
    val version: Int = 1,                    // Protocol version
    val type: MessageType,                   // TEXT, FILE, PAYMENT
    val senderKeyHash: ByteArray,            // keccak256(sender)[:8]
    val recipientKeyHash: ByteArray,         // keccak256(recipient)[:8]
    val ephemeralPubKey: ByteArray,          // 32 bytes (X25519)
    val nonce: ByteArray,                    // 12 bytes (GCM)
    val ciphertext: ByteArray,               // Encrypted content
    val authTag: ByteArray,                  // 16 bytes (GCM auth)
    val timestamp: Long,                     // Unix millis
    val signature: ByteArray                 // Ed25519 signature
)
                

πŸ”— Direct Delivery (Online)

When recipient is online, messages go directly through the managed hub.

// 1. Connect to hub (WebSocket)
hub.connect(walletSignature)

// 2. Encrypt message with recipient's key
encrypted = E2E.encrypt(message, recipientPubKey)

// 3. Send through hub (opaque blob)
hub.send(encrypted)  // Hub can't read content

// 4. Receive delivery confirmation
ack = hub.receiveAck()
                    

πŸ“¦ Relay Delivery (Offline)

When recipient is offline, relay nodes queue messages (200 per user cap).

// 1. Recipient not online
if (!hub.isOnline(recipient)) {

    // 2. Queue encrypted message on relay
    relay.queue(encrypted, ttl = 7.days)
    
    // 3. Rate limited: 10 msg/sec
    // Queue cap: 200 msg/user, 50K total
    
    // 4. Eligible routed work can later become rewardable
}
                    

🌐 Relay Network

Decentralized nodes that store encrypted messages for offline users while the coordinator tracks eligible routed work, proof readiness, and abuse controls.

Relay Node Infrastructure

Hardened Relay Architecture

Relay nodes store encrypted blobs only β€” they never see plaintext content. Current reward eligibility is tied to coordinator-signed delivery proofs and verified relay accounting rather than blind forwarding alone.

Anti-abuse protections: 10 msg/sec rate limiting, 256KB max payload, 200 messages per user queue cap, 50K total message cap, wallet-authenticated sessions, and cooldown-backed proof submission.

πŸ“‘ Multi-Node πŸ” Encrypted Blobs ⚑ Rate Limited βœ… Signed Proofs