README
ΒΆ
π‘οΈ SecureE2E
[!NOTE] This project is dedicated to all those who lost their lives during the Iranian National Revolution; those whose names we will remember forever, those whose names will never be spoken, and especially the Unknown Martyr No. 11780.
π About
SecureE2E is a client-server chat application where the server acts as a neutral relay. It ensures that even if the server is compromised, your message content remains private.
This project implements a custom cryptographic protocol featuring:
- Double Ratchet Algorithm: Provides Forward Secrecy and Future Secrecy. Every message uses a unique encryption key.
- Asymmetric Handshake: Uses Ed25519 for identity signing and Curve25519 for key exchange.
- Separation of Duties: The Server Password protects access to the network, while the E2E keys protect the content of your messages.
β¨ Features
- π True End-to-End Encryption: Messages are encrypted on your device and only decrypted on the recipient's device. The server cannot read them.
- π Perfect Forward Secrecy: Compromising a long-term key does not decrypt past messages.
- π Identity Verification: Each user generates a unique fingerprint. Verify this out-of-band to ensure you aren't being Man-in-the-Middled (MitM).
- π‘οΈ Secure Transport: The connection to the server is secured using AES-256-GCM, derived via Scrypt.
- π« No Self-Messaging: Logic prevents routing loops and errors by blocking messages sent to oneself.
- π Message Queuing: If you start typing before the cryptographic handshake is finished, messages are safely queued and sent automatically once the channel is secure.
π Security Architecture
The security model operates in two distinct layers:
- Transport Layer (Client β Server) :
- Purpose: Prevents unauthorized users from connecting to the chat server.
- Mechanism: Scrypt Key Derivation + AES-256-GCM.
- Key: Derived from the Server Password.
- Application Layer (Client β Client) :
- Purpose: Ensures only the intended recipient can read the message content.
- Mechanism: Double Ratchet (X3DH inspired).
- Keys :
- Identity Key: Ed25519.
- Ephemeral Key: Curve25519.
- The Ratchet: Both sides maintain a chain key. Sending a message advances the sending chain and derives a unique message key.
π¦ Installation
Omptimized for windows OS ( both clien/server ) you need modify it for Linux environments.
Prerequisites
- Go 1.21+ installed.
- Terminal access.
- Clone the Repository
git clone https://github.com/yourusername/SecureE2E-Go.gitcd SecureE2E-Go
- Install Dependencies
go get golang.org/x/crypto/curve25519
go get golang.org/x/crypto/ed25519
go get golang.org/x/crypto/hkdf
go get golang.org/x/crypto/scrypt
golang.org/x/crypto/ssh/terminal
golang.org/x/crypto/argon2
- Build
# Build Server
go build -o server server.go
# Build Client
go build -o client client.go
π Usage
Download Video ( can't preview on web ) : (Link).
Follow Me
- X (Twitter): https://x.com/N_Nikjoo
- LinkedIn: https://www.linkedin.com/in/nimanikjoo/
- Telegram Channel: https://t.me/VSEC_academy
π License Distributed under the MIT License.
Documentation
ΒΆ
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.