Skip to content

omgnoe/echochat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” EchoChat

Zero-Knowledge Encrypted Messenger

Flutter Node.js License Version

Zero-Knowledge β€’ End-to-End Encrypted β€’ Private

A truly private messaging app where even the server cannot read your messages, see your nickname, or know who you're talking to.

Download APK TestFlight

⚠️ Note: This project uses a Source Available License. You can view, study, and contribute to the code, but redistribution and publishing derivative works is not permitted. See LICENSE for details.


πŸ“² Download

Platform Link
Android Download APK
iOS TestFlight

✨ Features

πŸ”’ Zero-Knowledge Architecture

  • True Privacy - Server never sees nicknames, message contents, or friend relationships
  • End-to-End Encryption - All messages encrypted using X25519 + AES-256-GCM
  • Anonymized IDs - User IDs are hashed before reaching the server
  • No Phone/Email Required - Just pick a nickname and start chatting

πŸ›‘οΈ MITM Protection

  • Key Verification - Verify contacts with security fingerprints
  • QR Code with Key Hash - QR codes include public key hash for verification
  • Verified Badges - Mark friends as verified after out-of-band confirmation

⏱️ Ephemeral by Design

  • Auto-Expiring Sessions - Chat sessions expire after 3 days
  • No Message Storage - Messages exist only on your device
  • Session Cleanup - Server automatically purges inactive sessions

πŸ‘₯ Easy Connection

  • QR Code Sharing - Scan to add friends instantly
  • Friend Codes - Share your unique ECHO-XXXXXXXX code
  • Ping Notifications - Invite friends to chat with a single tap

πŸ“± Modern Experience

  • Beautiful Dark UI - Sleek, modern interface
  • Cross-Platform - iOS, Android (Desktop coming soon)
  • Offline Message Queue - Messages sync when connection restores

πŸ” What the Server CANNOT See

Data Protected
Message contents βœ… Encrypted
Your nickname βœ… Encrypted exchange
Who you're talking to βœ… Only sees anonymous tokens
Friend relationships βœ… Stored locally only
Your real user ID βœ… SHA-256 hashed

The server only sees: Encrypted blobs, anonymous tokens, and timing metadata.


πŸ—οΈ Architecture

EchoChat/
β”œβ”€β”€ echochat_app/          # Flutter mobile application
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ screens/       # UI screens
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic & crypto
β”‚   β”‚   └── theme/         # App theming
β”‚   └── ...
β”‚
└── echochat-backend/      # Node.js WebSocket server
    └── src/
        β”œβ”€β”€ server.ts          # Main server (Zero-Knowledge)
        β”œβ”€β”€ session_manager.ts # Session lifecycle
        └── group_manager.ts   # Group chat support

Security Model

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Client A  β”‚                    β”‚   Client B  β”‚
β”‚             β”‚                    β”‚             β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚    Encrypted       β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚PrivKey Aβ”‚ │◄──────────────────►│ β”‚PrivKey Bβ”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚    Nickname +      β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚      β”‚      β”‚    Messages        β”‚      β”‚      β”‚
β”‚      β–Ό      β”‚         β”‚          β”‚      β–Ό      β”‚
β”‚ SharedSecretβ”‚         β”‚          β”‚ SharedSecretβ”‚
β”‚ (X25519)    β”‚         β”‚          β”‚ (X25519)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  EchoChat Serverβ”‚
              β”‚   (v1.2.0 ZK)   β”‚
              β”‚                 β”‚
              β”‚  ❌ No plaintextβ”‚
              β”‚  ❌ No nicknamesβ”‚
              β”‚  ❌ No user IDs β”‚
              β”‚  βœ… Only tokens β”‚
              β”‚  βœ… Only hashes β”‚
              β”‚  βœ… Encrypted   β”‚
              β”‚     payloads    β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Getting Started

Prerequisites

  • Flutter SDK 3.x or higher
  • Node.js 18+ (for backend)
  • Dart 3.x

Backend Setup

cd echochat-backend

# Install dependencies
npm install

# Compile TypeScript
npx tsc

# Start the server
node dist/server.js

# Or with custom port
PORT=8080 node dist/server.js

The server runs on ws://localhost:8080 by default.

App Setup

cd echochat_app

# Get dependencies
flutter pub get

# Run on device/emulator
flutter run

# Build for release
flutter build apk --release      # Android
flutter build ios --release      # iOS

Configuration

Update the WebSocket URL in lib/services/ws_service.dart:

EchoChatWebSocketService({
  this.url = 'wss://your-server.com',  // Your server URL
})

πŸ“¦ Dependencies

Flutter App

Package Purpose
cryptography X25519 & AES-GCM encryption
flutter_secure_storage Secure key storage
web_socket_channel WebSocket communication
qr_flutter QR code generation
mobile_scanner QR code scanning
flutter_local_notifications Push notifications

Backend

Package Purpose
ws WebSocket server
crypto ID anonymization (SHA-256)

πŸ” Cryptography Details

Key Exchange

  • Algorithm: X25519 (Curve25519 ECDH)
  • Key Size: 256-bit
  • Each user generates a permanent identity keypair stored securely on-device

Message Encryption

  • Algorithm: AES-256-GCM
  • Nonce: 96-bit random per message
  • MAC: 128-bit authentication tag

Passcode Hashing

  • Algorithm: FNV-1a with salt
  • Output: 128-bit (16 hex characters)
  • Backwards compatible with legacy hash format

Key Verification

  • Fingerprint: 12 characters (XXXX-XXXX-XXXX)
  • QR Format: v3 with embedded key hash
  • Out-of-band verification supported

Message Format

{
  "ciphertext": "base64...",
  "nonce": "base64...",
  "mac": "base64..."
}

πŸ“± Screenshots

Home Chat Friends
Sessions list E2E encrypted QR & verification

πŸ›£οΈ Roadmap

  • End-to-end encryption
  • Session management
  • QR code friend adding
  • Ping notifications
  • Zero-Knowledge architecture
  • MITM protection (key verification)
  • Backwards compatibility
  • Group chats (encrypted)
  • Desktop support
  • File/image sharing
  • Voice messages
  • Push notifications (FCM/APNs)

🀝 Contributing

We welcome contributions! This project is open for collaboration to build a better private messenger together.

How You Can Help

  • πŸ› Report Bugs - Found something broken? Open an issue!
  • πŸ” Security Research - Review the crypto implementation, find vulnerabilities
  • πŸ’‘ Feature Ideas - Suggest improvements via issues
  • πŸ› οΈ Code Contributions - Submit pull requests for bug fixes and features
  • πŸ“– Documentation - Help improve docs and translations

Getting Started

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Test your changes before submitting
  • Be respectful in discussions

πŸ“œ By contributing, you agree to the terms in our LICENSE.


πŸ“„ License

This project is Source Available - not Open Source.

βœ… You CAN:

  • View and study the code
  • Run it privately for personal use
  • Contribute improvements via pull requests
  • Perform security research
  • Fork for contributing back

❌ You CANNOT:

  • Publish or distribute the app
  • Create derivative products
  • Use in commercial projects
  • Remove attribution

See LICENSE for full terms.


πŸ™ Acknowledgments

  • Built with Flutter
  • Cryptography powered by cryptography
  • Inspired by Signal's encryption protocol

Made with ❀️ by TTA

Report Bug Β· Request Feature

Releases

No releases published

Packages

 
 
 

Contributors