Chat di gruppo cifrata end-to-end con architettura client-server.
Il server relay non può leggere nessun messaggio. Mai.
📥 Download · 🚀 Avvio rapido · 🔒 Come funziona la cifratura · ☕ Supporta il progetto
- 🔒 Cifratura E2E — RSA-2048 per key exchange, AES-128 (Fernet) per i messaggi
- 💬 Stanze multiple — crea stanze pubbliche o protette da password
- 🔕 Chat privata — messaggi privati cifrati tra due utenti
- ⚡ Trill — notifica sonora con un click
- 😀 Emoji picker — 200+ emoji in 7 categorie
- 📣 @menzioni — notifica sonora e bubble evidenziato
- 😄 Reactions — reagisci ai messaggi con emoji in tempo reale
- 🔔 Badge notifiche — contatore messaggi non letti sul titolo finestra
- 🖥️ UI moderna — tema scuro con CustomTkinter, font Consolas
- ↻ Riconnessione automatica — backoff esponenziale in caso di caduta del server
┌─────────────┐ TCP :7300 ┌─────────────────────┐
│ Client A │ ◄──────────────────────► │ │
│ (Windows) │ │ server.py │
└─────────────┘ Messaggi cifrati E2E │ (Raspberry Pi) │
│ │
┌─────────────┐ TCP :7300 │ Il server vede │
│ Client B │ ◄──────────────────────► │ solo blob cifrati │
│ (Windows) │ │ │
└─────────────┘ └─────────────────────┘
Il server fa da relay puro: smista i pacchetti senza poterli decifrare.
Le chiavi RSA non lasciano mai il dispositivo del client.
SecureChat/
├── main.py # Client — interfaccia grafica (CustomTkinter)
├── client_core.py # Client — logica di rete e cifratura E2E
├── server.py # Server relay — da eseguire sul Raspberry Pi (o VPS)
├── LICENSE
└── README.md
Scarica l'ultima versione dalla pagina Releases:
SecureChat-v3.2.1-win64.zip— estrai e avviaSecureChat.exe- Non serve installare Python
git clone https://github.com/massiprofessor/securechat.git
cd securechat
pip install customtkinter cryptography
python main.py- Avvia
SecureChat.exe(opython main.py) - Inserisci il tuo nickname
- Inserisci l'indirizzo del server (es.
mioserver.webhop.me) - Clicca ▶ ENTRA
Sei automaticamente nella stanza #Generale.
Il server gira su qualsiasi macchina con Python 3.10+.
La configurazione consigliata è un Raspberry Pi con DDNS e port forwarding.
python server.py --port 7300Opzioni:
--port Porta di ascolto (default: 7300)
--log Abilita log verbosi per debug
Questa è la configurazione usata dallo sviluppatore. È la soluzione più economica per avere un server sempre online.
- Raspberry Pi (qualsiasi modello con Python 3.10+)
- Connessione internet con IP fisso o DDNS
- Router con supporto port forwarding
sudo apt update
sudo apt install python3 python3-pip -y
# Nessun pip install necessario — server.py usa solo librerie standardsudo mkdir -p /var/www/html/securechat
sudo cp server.py /var/www/html/securechat/sudo ufw allow 7300/tcp
sudo ufw reloadsudo nano /etc/systemd/system/securechat.serviceIncolla questo contenuto:
[Unit]
Description=SecureChat Server v3
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/python3 /var/www/html/securechat/server.py --port 7300
Restart=always
RestartSec=5
User=root
WorkingDirectory=/var/www/html/securechat
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable --now securechat
sudo systemctl status securechatSe il tuo IP pubblico cambia, usa un servizio DDNS gratuito:
- No-IP — noip.com → crea hostname tipo
mioserver.ddns.net - DuckDNS — duckdns.org → più semplice, aggiornamento automatico
- Dynu — dynu.com → alternativa valida
Installa il client DDNS sul Raspberry Pi per aggiornare automaticamente l'IP.
Accedi al pannello del router (solitamente 192.168.1.1) e aggiungi una regola:
| Campo | Valore |
|---|---|
| Protocollo | TCP |
| Porta esterna | 7300 |
| Porta interna | 7300 |
| IP destinazione | IP locale del Raspberry Pi |
Trova l'IP locale del Raspberry con:
hostname -I💡 Consiglio: assegna un IP fisso al Raspberry Pi dal pannello DHCP del router per evitare che l'IP locale cambi.
sudo systemctl status securechat # Stato del servizio
sudo systemctl restart securechat # Riavvia il server
sudo journalctl -u securechat -f # Log in tempo realeSecureChat implementa cifratura end-to-end a due livelli:
1. All'avvio:
Ogni client genera una coppia di chiavi RSA-2048
La chiave pubblica viene inviata al server → distribuita a tutti i peer
2. Per ogni messaggio:
┌─ Mittente ──────────────────────────────────────────┐
│ 1. Genera session key AES-128 (Fernet) casuale │
│ 2. Cifra il testo con la session key │
│ 3. Cifra la session key con RSA pub_key di ogni │
│ destinatario │
│ 4. Invia: { ciphertext, encrypted_keys: {id: key} }│
└─────────────────────────────────────────────────────┘
↓ il server vede solo questo blob
┌─ Destinatario ──────────────────────────────────────┐
│ 1. Decifra la propria session key con RSA priv_key │
│ 2. Decifra il testo con la session key │
└─────────────────────────────────────────────────────┘
Il server non ha accesso alle chiavi private — non può decifrare nessun messaggio.
pip install pyinstaller
pyinstaller SecureChat.specL'exe si trova in dist/SecureChat/SecureChat.exe.
| Componente | Requisito |
|---|---|
| Python | 3.10 o superiore |
| customtkinter | pip install customtkinter |
| cryptography | pip install cryptography |
| tkinter | Incluso in Python standard |
| Sistema operativo | Windows 10/11, Linux, macOS |
Il server non ha dipendenze esterne oltre a Python 3.
Se SecureChat ti è utile, considera una donazione:
Mezzina Pasquale Massimo
🌐 massimoesperto.it
🐙 github.com/massiprofessor
Questo progetto è distribuito sotto licenza MIT.
Vedi il file LICENSE per i dettagli.