TribFi Protocol Documentation • Base Mainnet

TribFi Protocol Whitepaper

The decentralized architecture for fair-launch community tokens, zero-rug locked liquidity, and lifetime creator rewards on Base. Built with fixed 1 Billion token supplies, 5% anti-snipe limits, and permanent non-custodial smart contracts.

Section 13 • SocialFi, Gaming & Community Utilities
~5 min read•13 of 20

Messages & End-to-End Encryption: WebCrypto ECDH & Zero-Knowledge Relay

Client-side key generation, Elliptic Curve Diffie-Hellman session derivation, and AES-256-GCM ciphertexts

1. WebCrypto ECDH Key Exchange

TribFi Direct Messages support full client-side End-to-End Encryption (E2EE) powered by the W3C Web Cryptography API (crypto.subtle). Key pairs are generated directly in the user's browser:

The private key is stored locally in client-side secure storage and never sent over the network. The public key is published to the user's profile via /api/messages/keys.

2. AES-256-GCM Authenticated Encryption

When two users start an encrypted conversation, their browsers derive an identical shared secret using Elliptic Curve Diffie-Hellman (ECDH). Messages are encrypted locally using AES-256-GCM with a unique 96-bit initialization vector (IV) per message.

3. Zero-Knowledge Relay & Cache Model

The TribFi database and relay servers store only encrypted ciphertexts. Neither TribFi administrators, hosting providers, nor external attackers can read private messages or decrypt attachments.