Skip to content

My ISP tried to block this repo. 🀐 A truly peer-to-peer, end-to-end encrypted CLI chat that leaves NO logs. Perfect for... sensitive discussions. πŸ”₯ Get it before it gets taken down

License

Notifications You must be signed in to change notification settings

emilycodestar/cmd-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🀐 CMD-CHAT

encrypted terminal chat. no servers. no logs. ram only.

License: MIT Python 3.8+


peer-to-peer encrypted chat that runs in your terminal. you host, you control. close the window β€” everything's gone.

why

every "secure" messenger still stores metadata somewhere. this doesn't. it's just two terminals talking over an encrypted tunnel. nothing written to disk, ever.

how it works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        SRP AUTHENTICATION                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  CLIENT                                         SERVER           β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    │─────── POST /srp/init {username, A} ───────► β”‚              β”‚
β”‚    β”‚         (A = client public ephemeral)        β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    │◄────────── {user_id, B, salt} ────────────── β”‚              β”‚
β”‚    β”‚         (B = server public ephemeral)        β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    β”‚  [both sides compute shared session key      β”‚              β”‚
β”‚    β”‚   using password + ephemeral values]         β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    │─────── POST /srp/verify {user_id, M} ──────► β”‚              |
β”‚    β”‚         (M = client proof)                   β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    │◄────────── {H_AMK, session_key} ──────────── β”‚              β”‚
β”‚    β”‚         (H_AMK = server proof)               β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    β”‚  [password never transmitted]                β”‚              β”‚
β”‚    β”‚  [MITM can't derive session key]             β”‚              |
β”‚    β”‚                                              β”‚              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                        ENCRYPTED CHAT                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    β”‚                                              β”‚              β”‚
β”‚    │═══════ WebSocket /ws/chat?user_id ═════════► β”‚              β”‚
β”‚    β”‚         (authenticated session)              β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    │◄═══════════ AES-encrypted messages ════════► β”‚              β”‚
β”‚    β”‚         (Fernet = AES-128-CBC + HMAC)        β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β”‚    β”‚  [on disconnect: keys wiped from RAM]        β”‚              β”‚
β”‚    β”‚                                              β”‚              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

SRP (Secure Remote Password) β€” password is never sent over the network. both sides prove they know it via zero-knowledge proof, then derive identical session keys.

install

git clone https://github.com/emilycodestar/cmd-chat.git
cd cmd-chat
python -m venv venv && source venv/bin/activate && pip install -r requirements.txt

windows:

python -m venv venv ; .\venv\Scripts\activate ; pip install -r requirements.txt

usage

start server:

python cmd_chat.py serve 0.0.0.0 3000 --password mysecret

connect:

python cmd_chat.py connect SERVER_IP 3000 username mysecret

Example

features

  • ram only β€” nothing touches disk
  • rsa + aes β€” key exchange + symmetric encryption
  • no central server β€” direct p2p connection
  • srp auth β€” password never sent over network

license

MIT

About

My ISP tried to block this repo. 🀐 A truly peer-to-peer, end-to-end encrypted CLI chat that leaves NO logs. Perfect for... sensitive discussions. πŸ”₯ Get it before it gets taken down

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published