Metadata-Version: 2.4
Name: witchat
Version: 0.2.2
Summary: An encrypted p2p chat app
Project-URL: Repository, https://github.com/vividsystem/witchat
Author: vividsystem
License: MIT License
        
        Copyright (c) 2025 vividsystem
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: asyncio>=4.0.0
Requires-Dist: kademlia>=2.2.3
Requires-Dist: prompt-toolkit>=3.0.52
Requires-Dist: pynacl>=1.6.0
Requires-Dist: uvloop>=0.22.1
Description-Content-Type: text/markdown

# witchat
`witchat` (pronounced: witch hat) is a peer-to-peer messaging platform. That means you don't have to rely on a single source-of-truth or a server.
All messages are encrypted using the [`X25519`](https://en.wikipedia.org/wiki/Curve25519) end-to-end encryption algorithm. Additionally all messages are signed using [`ed25519`](https://en.wikipedia.org/wiki/EdDSA).
Synchronisation and message transfer is done via a [DHT](https://en.wikipedia.org/wiki/Distributed_hash_table).
Allthough privacy is guaranteed(as long as you disregard quantum-computers) in the current version, data integrity is not as anyone can delete the stored messages without leaving a trace. This might get improved upon in the future using hashing similarly like a blockchain.
The current approach isn't optimal efficiency-wise as asymetric encryption takes longer to compute than symetric encryption.
Theoretically it would be more efficient to use asymetric encryption only for key-exchange. 

## Requirements
* python
* uv (heavily recommended)
* a friend to chat to (or a second terminal)
## Installation
NOTE: If you truly want to make this truly decentralized and p2p you will have to port-forward to the internet and that's dangerous. If you want to test the potential capabilities try connecting to `vividsystem.hackclub.app:8468`

```bash
# using uv (recommended)
uv tool install witchat 

# or using pip
pip install witchat 
```
to try it out just use `uvx wisort`


## Usage
On launch you will get asked to specify a port, a number of peer ips to connect to and a display name.
After that you can use following commands:
- `.enter`: sends your contact information and your public keys into the network so that people can safely communicate with you
- `.chat [fingerprint]`: select a user to chat to
- `.leave`: unselects the user you were previously chatting to
- `.fingerprint`: prints out your fingerprint
- `.exit`: exits the programm
If you type anything else, it will get sent as a message to your selected recipient.

## Config
(as of now there is no way to configure witchat)
## Acknowledgements
This project would not be possible without [kademlia](https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf).
## License
See [LICENSE](./LICENSE)
