Proof of concept of an end-to-end encrypted peer-to-peer chat program written in Python.
Project description
snakewhisper
snakewhisper is a simple end-to-end encrypted chat program written in Python. It's functional (it currently supports two-way communication with a pre-shared key), but snakewhisper is primarily a proof-of-concept that showcases how regular computer users can easily access—or even create—chat programs with end-to-end encryption.
Installation
Pip
$ pip3 install snakewhisper
Git
$ git clone https://github.com/slightlyskepticalpotat/snakewhisper.git
$ cd snakewhisper
$ pip3 -r requirements.txt
Usage
The below commands show the basic features of snakewhisper.
Generate Key
Pip
$ python3 -m snakewhisper_key
Git
$ python3 snakewhisper_key.py
Output
Key: VJM5wFYxuM1oi5VD3WBRMv4NpTnnVQA8wVNV1x4KSig=
Save? (y/n): y # type here
Save As: snakewhisper.key # type here
Saved As: snakewhisper.key
Connect/Chat
Pip
$ python3 -m snakewhisper_chat
Git
$ python3 snakewhisper_chat.py
Output
Log? (y/n): y # type here
KEY: VJM5wFYxuM1oi5VD3WBRMv4NpTnnVQA8wVNV1x4KSig= # type here
INFO: Listening on port 2048
INFO: /help to list commands
HOST: 1.1.1.1 # type here
INFO: Connected to 1.1.1.1
INFO: New connection 1.1.1.1
# now you type messages or commands
alice to bob # your message
1.1.1.1: bob to alice # their message
/help # list all commands
INFO: /alias /clear /help /ip /quit /remote /time
/help quit # describe quit command
INFO: Quits the program
/quit # quits the program
INFO: Quit successfully
Cryptography
For easy implementation, snakewhisper uses the Fernet encryption scheme from the cryptography Python package. Fernet is just AES-128 encryption with a SHA-256 hash-based message authentication code, and the full specification can be viewed here. It also adds a timestamp to the message, but snakewhisper does not use that functionality.
To-do List
- Proper key exchange algorithm
- Register and upload pip package
- More than two people chatting
Contributing
Pull requests are welcome, but please open an issue to discuss major changes.
License
snakewhisper is licenced under version 3.0 of the GNU Affero General Public License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file snakewhisper-0.0.1.tar.gz
.
File metadata
- Download URL: snakewhisper-0.0.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc41567335a8efb0e121e1369fad00a3e9e983db8e8aef48b9d3a5b334731aea |
|
MD5 | f83c9d02a5b432f91fa009097ed76bed |
|
BLAKE2b-256 | e2a9f1840a6f57983e7c5ebd3923fc874acc4dccf8aa87fa8ea0ce65f4a4b8d5 |
File details
Details for the file snakewhisper-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: snakewhisper-0.0.1-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad449320b69131166bd96cc0cddc02c63c7379cef59c0c73f52bf6b4338b889e |
|
MD5 | 5915251d9996e01327293e0ef8434c4d |
|
BLAKE2b-256 | 13c82c94b4d6c4e231269eca8562804a0badc011db0a2754f365522023d8ceb8 |