A secure P2P messenger with military-grade end-to-end encryption. Simple to use, but cryptographically robust tool for private communication.
- π‘οΈ End-to-End encryption using ChaCha20-Poly1305
- π Secure key exchange via X25519 (Curve25519)
- π Two operation modes: console (CLI) and graphical (GUI)
- π P2P connection - no intermediary servers
- π Optional authentication via Pre-Shared Key (PSK)
- πͺ Quantum-resistant (for symmetric encryption)
| Component | Algorithm | Security Level |
|---|---|---|
| Key Exchange | X25519 (Curve25519) | ~126 bits |
| Encryption | ChaCha20-Poly1305 | 256 bits |
| Key Derivation | HKDF-SHA256 | 256 bits |
| Authentication | PSK + AEAD | Depends on PSK |
Time to break: With proper configuration - practically impossible with modern methods (>10^60 years).
- Python 3.8+
- cryptography library
- PyQt6 (for GUI mode)
git clone https://github.com/qventymr/securechannel.git
cd securechannel
pip install -r requirements.txtpyqt6 >= 6.9.1
cryptography >= 45.0.5
# Launch with GUI (recommended)
python main.py
# Or explicitly
python main.py --guiStart as server:
python main.py -p 12345 --psk "your-secret-password"Connect as client:
python main.py 192.168.1.100 -p 12345 --psk "your-secret-password"Without password (less secure):
# Server
python main.py -p 12345
# Client
python main.py 192.168.1.100 -p 12345Using environment variables:
export ANON_PSK="my-super-secret-key"
python main.py -p 12345Server on specific interface:
python main.py -l 127.0.0.1 -p 12345 # localhost only
python main.py -l 0.0.0.0 -p 12345 # all interfaces- Use long PSK (16+ characters)
- Exchange PSK via secure channel
- Verify peer identity outside the application
- Use short PSK (8+ characters)
- Suitable for communication with trusted parties
- No PSK - protection only against passive eavesdropping
- Vulnerable to man-in-the-middle attacks
| Length | Characters | Security | Time to Crack* |
|---|---|---|---|
| 6 | a-z,0-9 | Weak | ~13 minutes |
| 8 | a-z,0-9 | Low | ~8 hours |
| 12 | a-z,A-Z,0-9 | Medium | ~87 years |
| 16+ | All symbols | High | Practically impossible |
*At 10^9 attempts per second
import secrets
import string
# Generate random PSK
alphabet = string.ascii_letters + string.digits + "!@#$%^&*"
psk = ''.join(secrets.choice(alphabet) for _ in range(20))
print(f"Your PSK: {psk}")- β Connection metadata (IP addresses, timing)
- β Traffic analysis by message size
- β Endpoint compromise
- β Keyloggers and other malware
- π PSK must remain secret
- π Use VPN/Tor to hide IP addresses
- π» Check devices for malware
- π Regularly change PSK
βββββββββββββββββββ Handshake βββββββββββββββββββ
β Client βββββββββββββββββββββ€ Server β
β β β β
β βββββββββββββββ β Encrypted Data β βββββββββββββββ β
β β X25519 Keys β βββββββββββββββββββββ€ β X25519 Keys β β
β βββββββββββββββ β β βββββββββββββββ β
β βββββββββββββββ β ChaCha20- β βββββββββββββββ β
β βChaCha20- β β Poly1305 β βChaCha20- β β
β βPoly1305 β β β βPoly1305 β β
β βββββββββββββββ β β βββββββββββββββ β
βββββββββββββββββββ βββββββββββββββββββ
HOST- Server IP address (omit for server mode)-p, --port- Port number (required for CLI mode)-l, --listen- Listen address for server (default: 0.0.0.0)--psk- Pre-shared key for authentication--gui- Force GUI mode--no-banner- Hide startup banner
- X25519: Equivalent to 3072-bit RSA
- ChaCha20-Poly1305: 256-bit security, AEAD construction
- HKDF-SHA256: Proper key derivation with salt support
- Weak PSK - Use strong passwords (16+ chars)
- Man-in-the-Middle - Verify peer identity out-of-band
- Traffic Analysis - Use VPN/Tor for metadata protection
- Endpoint Security - Keep systems updated and malware-free
- β Passive Eavesdropping: Fully protected
- β Active Network Attacks: Protected with strong PSK
β οΈ Nation-State Adversaries: Additional precautions needed- β Quantum Computers: X25519 vulnerable (ChaCha20 resistant)
MIT License - free for any use.
- π Cryptography Library Documentation
- π X25519 Specification (RFC 7748)
- π‘οΈ ChaCha20-Poly1305 (RFC 8439)
- π HKDF Standard (RFC 5869)
- π Signal Protocol Documentation
This software is intended for educational and research purposes. The authors are not responsible for illegal use. Always comply with local laws when using cryptographic tools.
Remember: Absolute security does not exist. Use common sense and additional security measures.
π‘ If this project was helpful, please give it a β star!
π‘οΈ Stay secure, stay private
Made with β€οΈ for privacy advocates worldwide