A decentralized peer-to-peer chat application built with Rust and Tokio. Provides real-time communication without intermediary servers through direct connections between peers.
Run shell/test_mux.sh
:
- Key Highlights
- What Makes This Special
- Demo
- Quick Start
- Features
- Usage
- Commands
- Configuration
- Building from Source
- Testing
- Shell Scripts
- Connecting Over the Internet
- Security
- Contributing
- License
- Military-Grade Encryption: 1024-bit RSA + AES-256-GCM end-to-end encryption
- Zero Configuration: Works instantly with just IP:port - no setup required
- True P2P: Direct peer connections, no central servers or intermediaries
- File Transfer: Send files up to 100MB with progress tracking and auto-open
- Rich Terminal UI: Colorful interface with encryption status indicators
- GUI Support: Optional graphical interface for enhanced user experience
- Windows Drag & Drop: Drag files directly onto the chat window (Windows executable)
- Cross-Platform: Linux, macOS, Windows support with async Rust performance
- Media Auto-Open: Automatically open received images, videos, and documents
- Smart Downloads: Files saved to system Downloads folder with verification
- Comprehensive Testing: 180+ tests across 10 categories with extensive coverage
Unlike traditional chat applications that rely on central servers, Rust P2P Chat establishes direct TCP connections between peers. There's no "server" and "client" in the traditional sense - both peers are equal participants in the conversation. The first peer simply waits for a connection, while the second initiates it. Once connected, both peers have identical capabilities.
# Clone the repository
git clone https://github.com/cschladetsch/RustChat.git
cd rust-p2p-chat
# Build and run
cargo run --release
Terminal 1 (First peer):
cargo run --release -- --port 8080
Terminal 2 (Second peer):
cargo run --release -- --connect localhost:8080
# Quick demo with docker-compose
docker-compose up
# Or run manually in two terminals:
# Terminal 1: docker run -it --rm -p 8080:8080 cschladetsch/rust-p2p-chat --port 8080
# Terminal 2: docker run -it --rm cschladetsch/rust-p2p-chat --connect host.docker.internal:8080
You are now chatting peer-to-peer with end-to-end encryption.
For Windows users who want to see two peers automatically connect:
# Run this single command from PowerShell:
powershell -ExecutionPolicy Bypass -File \\wsl.localhost\Ubuntu\home\xian\local\RustChat\rust-p2p-chat\WINDOWS-SETUP-SIMPLE.ps1
This single script will:
- ✅ Check if Rust is installed (prompts to install if missing)
- ✅ Copy project to
C:\RustProjects\rust-p2p-chat
- ✅ Build natively for Windows
- ✅ Launch two GUI windows (Alice & Bob) that auto-connect
- ✅ Enable drag & drop file sharing between windows
If you already have the executable built:
# Terminal 1 - Alice
.\target\release\rust-p2p-chat.exe --gui --port 8080 --nickname Alice
# Terminal 2 - Bob (waits 2 seconds, then runs)
.\target\release\rust-p2p-chat.exe --gui --port 8081 --connect localhost:8080 --nickname Bob
- 🚀 Drag & Drop: Drag files directly onto either window
- 🔒 Encrypted: All transfers use AES-256 encryption
- 👥 True P2P: No server needed, direct connection
- 📁 Any File Type: Images, music, documents up to 100MB
- 🪟 Windows 11 Optimized: Native performance and UI
- Windows 11 Guide - Comprehensive Windows setup
- Drag & Drop Guide - Detailed drag & drop features
- Build from Source - Manual build instructions
- True Peer-to-Peer Architecture: No central server required - direct connections between peers
- Symmetric Communication: Once connected, both peers are equal with no client/server hierarchy
- Real-time Bidirectional Messaging: Instant message delivery with concurrent send/receive
- Zero Configuration: Start chatting with just a port number or peer address
- Cross-platform Support: Works seamlessly on Linux, macOS, and Windows
- End-to-End Encryption: All messages encrypted using military-grade algorithms
- Custom Error Types: Comprehensive error handling with user-friendly messages
- Message Protocol: Support for different message types (text, files, commands, status)
- Message Buffering: Handles messages up to 8KB with configurable buffer size
- Heartbeat Mechanism: Keep-alive functionality to detect connection status
- Async/Await Excellence: Built on Tokio for high-performance async I/O
- Colorful Terminal UI: ANSI color support for better user experience
- GUI Interface: Optional graphical user interface with
--gui
flag - Graceful Error Handling: Robust connection management and clean disconnection
- Smart Connection Logic: Simultaneous connect/listen with automatic fallback
- Low Latency: Direct TCP connections ensure minimal message delay
- Command-line Interface: Full CLI support with clap, including debug mode
- Configuration File Support: TOML-based configuration with customizable settings
- File Transfer Capability: Send files up to 100MB with progress tracking
- Command System: Built-in commands (/help, /quit, /send, /info, /nick, /autoopen)
- 1024-bit RSA Key Exchange: Secure public key cryptography for initial handshake
- AES-256-GCM Encryption: Military-grade symmetric encryption for messages
- Automatic Key Generation: New encryption keys for every session
- Message Authentication: Built-in integrity verification with GCM
- Visual Encryption Indicators: Icon shows when messages are encrypted
- TLS Support: Prepared for TLS encryption (can be enabled)
See the Building from Source section for detailed instructions.
cargo run
# Start as listener on specific port
cargo run -- --port 8080
# Connect to a peer directly
cargo run -- --connect 192.168.1.100:8080
# With nickname
cargo run -- --port 8080 --nickname Alice
# Enable debug logging
cargo run -- --port 8080 --debug
# Launch with GUI interface
cargo run -- --gui
# Launch GUI and connect to peer
cargo run -- --gui --connect 192.168.1.100:8080
# Generate default config file
cargo run -- config
For convenience, shell scripts are provided in the root directory:
# Build the project
./b
# Build and run (passes all arguments to the application)
./r
./r --port 8080
./r --gui --connect localhost:8080
Since this is a true P2P application, there's no permanent "server" or "client" - just two equal peers.
- First Peer (Listener):
- Run the application
- Press Enter when prompted for peer address
- Enter a port number (default 8080)
- The peer will bind to
0.0.0.0:port
and wait for incoming connections
- Second Peer (Connector):
- Run the application
- Enter the first peer's address in format
ip:port
(e.g.,127.0.0.1:8080
) - Connection will be established automatically
Important: After connection is established, both peers are completely equal - they can both send and receive messages simultaneously.
Terminal 1 (First Peer):
$ cargo run
P2P Chat Application
Usage:
1. Start as server: just press Enter when prompted for address
2. Connect to peer: enter address as ip:port (e.g., 127.0.0.1:8080)
Enter peer address (or press Enter to start as server):
Enter port to listen on (default 8080): 8080
Listening on: 0.0.0.0:8080
Waiting for peer to connect..
Peer connected from: 127.0.0.1:54321
Exchanging encryption keys..
End-to-end encryption enabled.
Type messages and press Enter to send (Ctrl+C to exit)
You: Hello from first peer.
Peer: Hi from second peer.
Terminal 2 (Second Peer):
$ cargo run
P2P Chat Application
Usage:
1. Start as server: just press Enter when prompted for address
2. Connect to peer: enter address as ip:port (e.g., 127.0.0.1:8080)
Enter peer address (or press Enter to start as server): 127.0.0.1:8080
Connecting to 127.0.0.1:8080..
Connected to peer.
Received encryption key from peer..
End-to-end encryption enabled.
Type messages and press Enter to send (Ctrl+C to exit)
Peer: Hello from first peer.
You: Hi from second peer.
During a chat session, you can use the following commands:
Command | Alias | Description |
---|---|---|
/help |
/? |
Display available commands |
/quit |
/exit |
Exit the chat application |
/send <file> |
/file |
Send a file to the peer |
/info |
Show connection and configuration information | |
/nick <name> |
/nickname |
Set or change your nickname |
/autoopen |
/auto |
Toggle auto-open for received media files |
/peers |
/list |
List connected peers (for future multi-peer support) |
# Send a file
You: /send ~/Pictures/vacation.jpg
File sent
# Change nickname
You: /nick Alice
Nickname set to: Alice
# Toggle auto-open
You: /autoopen
Auto-open media: disabled
# Get help
You: /help
Available commands:
/help, /? - Show this help message
/quit, /exit - Exit the application
/send, /file - Send a file to peer
..
# Using pre-built image (recommended)
docker run -it --rm -p 8080:8080 cschladetsch/rust-p2p-chat --port 8080
# Or build your own
docker build -t rust-p2p-chat .
docker run -it --rm -p 8080:8080 rust-p2p-chat --port 8080
Deploy your own version to Docker Hub:
# Using the deployment script
./deploy-docker.sh cschladetsch
# After deployment, others can use:
docker run -it --rm cschladetsch/rust-p2p-chat
# Run demo with two peers
docker-compose up
# Development mode with auto-reload
docker-compose -f docker-compose.dev.yml up
docker-chat.sh
- Convenience script for Docker operationsdeploy-docker.sh
- Deploy to Docker Hub
For detailed Docker documentation, see shell/docker/README.md.
The application supports configuration through a TOML file. Generate a default config:
cargo run -- config
This creates a config file at:
- Linux/macOS:
~/.config/rustchat/p2p-chat/config.toml
- Windows:
%APPDATA%\rustchat\p2p-chat\config.toml
# User settings
nickname = "Alice" # Your display name
default_port = 8080 # Default listening port
# Network settings
buffer_size = 8192 # Message buffer size in bytes
heartbeat_interval_secs = 30 # Keep-alive interval
reconnect_attempts = 3 # Number of reconnection attempts
reconnect_delay_secs = 5 # Delay between reconnection attempts
# Security settings
enable_encryption = true # Enable end-to-end encryption
# File transfer settings
max_file_size_mb = 100 # Maximum file size for transfers
download_dir = "/path/to/downloads" # Custom download directory (optional)
auto_open_media = true # Auto-open received media files
media_extensions = [ # File types to auto-open
"jpg", "jpeg", "png", "gif",
"mp4", "avi", "mov",
"pdf", "doc", "docx"
]
# Logging settings
log_level = "info" # Options: trace, debug, info, warn, error
save_history = true # Save chat history
history_file = "/path/to/history" # Custom history file location (optional)
First, ensure you have Rust installed. If not, install it from rustup.rs.
Pre-built binaries will be available in the Releases section. For now, please build from source using Option 2 below.
-
Install Rust:
Using winget (Recommended):
# Install Rust winget install Rustlang.Rustup # Run the installer (this will appear after winget finishes) # If rustup-init doesn't run automatically, download it from https://win.rustup.rs/x86_64 # Follow the prompts (press Enter for defaults) # IMPORTANT: Restart PowerShell after installation
Or download directly:
- Go to https://rustup.rs/
- Download and run
rustup-init.exe
- Follow installation prompts
- Restart PowerShell/Command Prompt
-
Verify installation:
rustc --version
cargo --version
- Clone and build:
# Clone the repository
git clone https://github.com/cschladetsch/RustChat.git
cd rust-p2p-chat
# Build release version
cargo build --release
# The executable will be at: target\release\rust-p2p-chat.exe
- Run with drag & drop GUI:
.\target\release\rust-p2p-chat.exe --gui
If you prefer building from WSL for Windows:
# Install MinGW cross-compiler
sudo apt update
sudo apt install gcc-mingw-w64-x86-64
# Use the build script
./build-windows-from-wsl.sh
# Or build manually
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
For convenience, use the provided scripts:
build-windows.bat
- Build using Command Promptbuild-windows.ps1
- Build using PowerShell (may require execution policy bypass)create-windows-installer.ps1
- Create distributable package
PowerShell Execution Policy: If you get "script is not digitally signed" error:
# Option 1: Bypass for single script
powershell -ExecutionPolicy Bypass -File .\build-windows.ps1
# Option 2: Set for current session only
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
- Drag & Drop: Drag files directly onto the chat window
- File Browser: Click 📎 button to browse files
- Auto GUI: Launches in GUI mode by default on Windows
- No Console: GUI mode runs without console window
- On first run, Windows Firewall may prompt you to allow the application
- Allow access for both private and public networks if you plan to connect over the internet
"Cannot run script" error:
# Use bypass execution policy
powershell -ExecutionPolicy Bypass -File WINDOWS-SETUP-SIMPLE.ps1
"Rust not found" after installation:
- Close and reopen PowerShell
- Or refresh PATH:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
"Address already in use" error:
- Use different ports:
--port 9090
for Alice,--port 9091
for Bob - Kill existing instances:
taskkill /F /IM rust-p2p-chat.exe
WSL path issues:
- Build natively on Windows using
WINDOWS-SETUP-SIMPLE.ps1
- Or copy exe to Windows:
cp target/release/rust-p2p-chat.exe /mnt/c/Users/YOUR_USERNAME/Desktop/
- Install Rust and dependencies:
# Update package list
sudo apt update
# Install build essentials and Rust dependencies
sudo apt install -y build-essential pkg-config libssl-dev
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
- Clone and build:
# Clone the repository
git clone https://github.com/cschladetsch/RustChat.git
cd rust-p2p-chat
# Build release version
cargo build --release
# Run tests
cargo test
# Run the application
./target/release/rust-p2p-chat --help
- WSL-specific notes:
- For connecting between WSL and Windows host, use the WSL IP address (run
hostname -I
in WSL) - Port forwarding may be required for external connections
- Install Rust and dependencies:
# Install Xcode Command Line Tools (if not already installed)
xcode-select --install
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
- Clone and build:
# Clone the repository
git clone https://github.com/cschladetsch/RustChat.git
cd rust-p2p-chat
# Build release version
cargo build --release
# Run tests
cargo test
# Run the application
./target/release/rust-p2p-chat --help
- macOS Security Note:
- On first run, macOS may block the application
- Go to System Preferences → Security & Privacy → General
- Click "Allow Anyway" for rust-p2p-chat
- Or run with:
sudo spctl --add./target/release/rust-p2p-chat
# Debug build (slower but with debug symbols)
cargo build
# Release build (optimized)
cargo build --release
# Run directly without building binary
cargo run -- --port 8080
# Build and run tests
cargo test
# Build with specific features (if available)
cargo build --release --features "feature_name"
- Rust version too old:
rustup update
- Missing OpenSSL (Ubuntu/WSL):
sudo apt install libssl-dev
- Permission denied (Unix-like systems):
chmod +x./target/release/rust-p2p-chat
- Build cache issues:
cargo clean
cargo build --release
The project includes comprehensive unit and integration tests covering all major functionality.
# Run all tests
cargo test
# Run unit tests only
cargo test --lib
# Run integration tests
cargo test --test integration_tests
cargo test --test simple_integration_test
# Run tests with output
cargo test -- --nocapture
# Test encryption specifically
cargo run --bin test_chat
The project includes several testing and demo scripts in the shell/
directory:
# Quick testing
./shell/quick_test.sh # Rapid testing of two peers
./shell/automated_test.sh # Automated test scenarios
./shell/comprehensive_test.sh # Full test suite with all features
# Demo scripts
./shell/demo.sh # Basic demo setup
./shell/demo_chat.sh # Interactive chat demonstration
./shell/demo_colors.sh # Terminal color testing
# Specialized tests
./shell/test_encryption.sh # Encryption-specific tests
./shell/test_p2p.sh # P2P connection tests
./shell/test_tmux.sh # tmux-based split terminal testing
The project includes a comprehensive test suite with 183+ individual tests across 10 major categories:
- File Transfer Tests (9 tests) - Hash verification, size limits, unicode filenames
- Configuration Tests (10 tests) - Defaults, validation, serialization, path resolution
- Protocol Tests (14 tests) - Message serialization, all message types, large data
- Command Tests (20 tests) - Command parsing, handler functionality, edge cases
- Error Handling Tests (34 tests) - All error types, user-friendly messages
- Reliability Tests (15 tests) - Message acknowledgments, retries, timeouts
- Concurrent Tests (7 tests) - Stress testing with 20+ connections, race conditions
- Peer Management Tests (15 tests) - Concurrent access, IPv6 support, edge cases
- Encryption Tests (39 tests) - E2E encryption, RSA key exchange, AES-256-GCM
- Integration Tests (20 tests) - Real-world scenarios, file workflows
- Clippy: No warnings (clean linting)
- Type checking: All types verified with
cargo check
- Performance: Sub-second test execution
- Coverage: Comprehensive edge case testing
The shell/
directory contains various testing and demonstration scripts:
quick_test.sh
- Rapid two-peer testing setupautomated_test.sh
- Automated test scenarios with predefined inputscomprehensive_test.sh
- Full feature test suitetest_encryption.sh
- Encryption-specific functionality teststest_p2p.sh
- P2P connection and messaging teststest_tmux.sh
- Split-screen terminal testing using tmux
demo.sh
- Basic demonstration setupdemo_chat.sh
- Interactive chat demonstrationdemo_colors.sh
- Terminal color and formatting tests
# Make scripts executable (if needed)
chmod +x shell/*.sh
# Run any script
./shell/quick_test.sh
Since this is a direct TCP connection app, at least one peer needs a publicly accessible IP/port. Here are several ways to connect with friends over the internet:
Ngrok creates a public tunnel to your local port. Perfect for quick chats.
- Install ngrok:
# Download from https://ngrok.com/download
# Or use package manager
brew install ngrok/ngrok/ngrok # macOS
snap install ngrok # Linux
- You (host):
# Terminal 1: Start the chat
cargo run -- --port 8080
# Terminal 2: Create public tunnel
ngrok tcp 8080
- Share with friend:
Ngrok will show:
Forwarding tcp://0.tcp.ngrok.io:12345 -> localhost:8080
Your friend runs:
cargo run -- --connect 0.tcp.ngrok.io:12345
If you have router access:
- Configure router:
- Access router admin panel (usually 192.168.1.1)
- Forward port 8080 to your local IP
- Find your public IP:
curl ifconfig.me
- Start chat:
cargo run -- --port 8080
- Friend connects:
cargo run -- --connect YOUR_PUBLIC_IP:8080
Use a mesh VPN for a private network between devices:
Both give you and your friend private IPs that work as if you're on the same network.
Rent a small VPS (AWS EC2, DigitalOcean, Linode):
# On VPS
./rust-p2p-chat --port 8080
# Both you and friend connect to VPS
./rust-p2p-chat --connect VPS_IP:8080
- localtunnel:
lt --port 8080
- bore:
bore local 8080 --to bore.pub
- serveo:
ssh -R 80:localhost:8080 serveo.net
This app uses direct TCP connections, requiring at least one peer to have a publicly accessible IP/port. For true P2P through NATs without configuration, future versions could implement:
- UDP hole punching
- STUN/TURN servers
- ICE negotiation
- WebRTC implementation
This application implements a symmetric peer-to-peer architecture where:
- Both peers run identical code
- No dedicated server process - any peer can listen or connect
- After handshake, the connection is fully bidirectional with no master/slave relationship
- Each peer maintains its own event loop for handling I/O
- Tokio Runtime: Leverages Tokio's multi-threaded runtime for efficient async I/O
- Zero-copy Operations: Minimizes memory allocations during message passing
- Event-driven Architecture: Non-blocking I/O ensures responsive user experience
- TCP Socket Handling: Direct TCP stream manipulation for low-level control
- Stream Splitting: Uses
stream.into_split()
for separate read/write halves - Concurrent I/O: Separate async tasks for reading and writing operations
- Graceful Shutdown: Proper resource cleanup on disconnection
- Simultaneous Connect/Listen: Can try connecting while accepting connections
- Binary Protocol: Supports both plaintext (backward compatible) and binary formats
- Message Types: Text, EncryptedText, File, Command, Status, Heartbeat, Encryption
- Direct Async I/O: Uses
AsyncReadExt
andAsyncWriteExt
for socket operations - Stream Processing: Handles partial reads and message fragmentation
- Large Buffer: Configurable buffer size (default 8KB)
- Automatic Serialization: Uses bincode for efficient message encoding
- Automatic Handshake: RSA public key exchange on connection
- Session Keys: Fresh AES-256 key generated for each session
- Zero-Knowledge: Keys are never transmitted in plaintext
- Forward Secrecy: New keys for every connection
- Transparent Encryption: Messages automatically encrypted when available
- Connection Resilience: Gracefully handles network interruptions
- Input Validation: Sanitizes user input and peer addresses
- Comprehensive Error Types: Detailed error reporting for debugging
- Recovery Mechanisms: Automatic cleanup on peer disconnection
- Port Conflict Detection: Helpful diagnostics when port is already in use
- Low Memory Footprint: Minimal runtime overhead (~2-5 MB)
- High Throughput: Can handle thousands of messages per second
- Low Latency: Sub-millisecond message delivery on local networks
- Scalable Architecture: Could be extended to support multiple peers
rust-p2p-chat/
├── Cargo.toml # Project dependencies and metadata
├── Readme.md # This documentation
├── Features.md # Detailed feature documentation
├── ChangeLog.md # Version history and changes
├── resources/ # Demo and documentation assets
│ └── Demo1.gif # Animated demonstration
├── src/
│ ├── main.rs # Application entry point and CLI interface
│ ├── lib.rs # Core P2P chat implementation
│ ├── colors.rs # ANSI color support for terminal UI
│ ├── protocol.rs # Message protocol definitions
│ ├── encryption.rs # End-to-end encryption implementation
│ ├── error.rs # Custom error types
│ ├── config.rs # Configuration management
│ ├── commands.rs # Chat command handling
│ ├── file_transfer.rs # File transfer functionality
│ └── peer_manager.rs # Peer connection management
├── tests/
│ ├── integration_tests.rs # Complex multi-peer scenarios
│ └── simple_integration_test.rs # Basic connection and messaging tests
└── shell/ # Testing and demo scripts
├── quick_test.sh # Rapid peer testing
├── demo.sh # Basic demonstration
└──.. # Various other test scripts
# Terminal 1: Start first peer
./rust-p2p-chat --port 8080
# Terminal 2: Connect to first peer
./rust-p2p-chat --connect 127.0.0.1:8080
# Terminal 1
./rust-p2p-chat --port 8080 --nickname Alice
# Terminal 2
./rust-p2p-chat --connect 127.0.0.1:8080 --nickname Bob
Once connected, use the /send
command:
You: /send ~/Documents/report.pdf
File sent
The chat automatically establishes end-to-end encryption. To verify:
# Run the encryption test
cargo run --bin test_chat
# Output:
Created P2P chat instance
Encryption support: 1024-bit RSA + AES-256-GCM
Generated RSA keypairs
Exchanged public keys
Established shared AES key
Encrypted message: This is a secret message. -> 6/nQ+b1exOQM0jkx/co38KxQl28K2Sqh
Decrypted message: This is a secret message.
All encryption tests passed.
- GUI Support: Added optional graphical user interface with
--gui
flag - Shell Script Helpers: Added
./b
for build and./r
for run - Test Improvements: Updated integration tests to use idiomatic Rust patterns
- Code Quality: Fixed clippy warnings, improved error handling
- Documentation: Enhanced README with security notices and key highlights
- Custom Error Types: Replaced generic errors with specific ChatError types
- Enhanced Message Protocol: Support for text, files, commands, and status updates
- File Transfer: Send files up to 100MB with progress tracking
- Auto-open Media: Automatically open received images, videos, and documents
- Command System: Built-in commands like /help, /quit, /send, /autoopen
- Configuration Support: TOML-based config files with customizable settings
- CLI Arguments: Full command-line interface with clap
- Logging: Configurable logging levels with tracing
- End-to-End Encryption: 1024-bit RSA + AES-256-GCM encryption
The codebase is prepared for these features:
- Multiple peer support (mesh networking) - PeerManager ready
- End-to-end encryption - Fully implemented with RSA + AES-256-GCM
- File transfer capabilities - Fully implemented
- Message persistence and history - Config support ready
- GUI interface - Basic implementation with
--gui
flag - Peer discovery mechanisms - Can be added
- Perfect Forward Secrecy - Can enhance current encryption
- Certificate pinning - For enhanced security
- Mobile platform support - Can be added
- End-to-End Encryption: All messages are encrypted between peers
- RSA-1024 Key Exchange: Public key cryptography for secure key exchange
- AES-256-GCM: Military-grade symmetric encryption for message content
- Perfect Forward Secrecy: New encryption keys for every session
- Message Authentication: GCM mode provides built-in integrity verification
- Visual Indicators: icon shows encryption status for each message
- Verify Peer Identity: Always confirm you're connecting to the intended peer
- Use Strong Nicknames: Makes it easier to identify who you're chatting with
- Private Networks: For sensitive communications, use VPN or private networks
- Regular Updates: Keep the application updated for latest security patches
This implementation uses 1024-bit RSA keys for demonstration and educational purposes. For production use in high-security environments, consider:
- Upgrading to 2048-bit or 4096-bit RSA keys
- Implementing elliptic curve cryptography (ECC)
- Adding certificate pinning for known peers
- Implementing post-quantum cryptography for future-proofing
Contributions are welcome. Please feel free to submit a Pull Request. Some areas where contributions would be valuable:
- Enhanced encryption algorithms (ECC, post-quantum cryptography)
- GUI interface improvements
- Mobile platform support
- Peer discovery mechanisms
- Network protocol optimizations
- Documentation improvements
- Additional language bindings
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please ensure your code:
- Passes all tests (
cargo test
) - Has no clippy warnings (
cargo clippy
) - Is properly formatted (
cargo fmt
) - Includes appropriate documentation
This project is open source and available under the MIT License. See the LICENSE file for more details.
Made with Rust