Own PQS encryption
- Architecture: Pure P2P - no servers, no databases
- Key storage: Keys generated in memory, never stored, erased after use
- Metadata: Only IP and port exist during the session - everything else is encrypted & obfuscated
- Encryption: PQS v1.2 - PBKDF2-HMAC-SHA256 (200k), BLAKE2s-MAC, custom stream cipher + fake padding
- Authentication: BLAKE2s-MAC (16 bytes) - instant failure on any data change
- Packet obfuscation: --stealth mode - padding, hidden structures
- Connection: Direct peer-to-peer only
- Anonymity: No accounts, logins, or phone numbers
- Third-party access: Impossible without physical access to both peers during session
- History: No storage — all in RAM, wiped on close
- Message size: Limited only by RAM & MTU — no artificial limits
- External dependencies: None
- DPI/blocking resistance: Harder to detect, can be masked
- Autonomy: Fully offline until peers connect
Listening for incoming connection (Server mode)
-
python3 pqs_chat.py --listen 0.0.0.0:0000 --password --nick --stealth
-
--listen IP:port - Bind to specified IP and port to accept connection
-
--password - Shared session password (PQS key derivation)
-
--nick - Local nickname shown in chat
-
--stealth - Enable packet obfuscation and structure hiding
Connecting to a peer (Client mode) python3 pqs_chat.py --connect 0.0.0.0:0000 --password --nick --stealth
- --connect IP:port - Bind to specified IP and port to accept connection
- --password - Shared session password (PQS key derivation)
- --nick - Local nickname shown in chat
- --stealth - Enable packet obfuscation and structure hiding
Example:
- Server mode: python3 pqs_chat.py --listen 0.0.0.0:7777 --password Test12345 --nick Ivan --stealth
- Client mode: python3 pqs_chat.py --connect 111.222.33.44:7777 --password Test12345 --nick John --stealth
REQUIREMENTS
Before using the messenger, ensure the following are installed:
- Python 3.8+
- Tor (system Tor daemon or
torbinary) - PySocks (required only for Tor client)
Install PySocks: pip install PySocks
Tor is used in two different roles:
- Server side: Tor acts as a Hidden Service gateway
- Client side: Tor acts as a SOCKS5 proxy
The application pqs_chat_tor.py itself uses Tor only on the client side, via a SOCKS5 proxy (default: 127.0.0.1:9050).
Used ONLY on the client side. Requires running Tor with a SOCKS5 listener.
Command:
python3 pqs_chat_tor.py --connect <ONION_ADDRESS>:PORT --password <pass> --nick <name> --stealth --torOptions:
- --connect onion:port Connect to Tor Hidden Service
- --tor Force SOCKS5 (Tor) connection
- --password Shared session password
- --nick Local nickname
- --stealth Enable obfuscation and noise padding
--tor is required when connecting to .onion addresses, as .onion resolution is only possible via Tor SOCKS5.
EXAMPLE (TOR HIDDEN SERVICE SETUP)
SERVER (clearnet, unchanged):
python3 pqs_chat.py --listen 0.0.0.0:40444 --password Test12345 --nick Ivan --stealthDataDirectory /Users/user/.tor
SocksPort 127.0.0.1:9050
HiddenServiceDir /Users/user/petoron_service
HiddenServicePort 5000 127.0.0.1:40444SocksPort is required for Tor client connections.
HiddenServicePort is required only on the server side. pqs_chat_tor.py connects to .onion services exclusively via SOCKS5.
START TOR:
tor -f torrcor
tor -f /path/to/torrcGET ONION ADDRESS:
cat /Users/user/petoron_service/hostnameCLIENT (TOR):
python3 pqs_chat_tor.py --connect abcd1234example.onion:5000 --password Test12345 --nick John --stealth --torpqs_chat.py
- Plain TCP server and direct client
pqs_chat_tor.py
- Tor/SOCKS5 client only
Server code is NOT modified for Tor. Tor handles routing and anonymity externally.
Licensed under the Petoron P2P Messenger Fair Use License by Ivan Alekseev | Petoron