IPFSChat is a decentralized chat application built on the InterPlanetary File System (IPFS) using Go. It leverages IPFS PubSub for message distribution and Diffie-Hellman key exchange for secure communication.
- Decentralized messaging using IPFS PubSub
- Secure communication with Diffie-Hellman key exchange
- AES-GCM encryption for message confidentiality
- Terminal-based user interface with tviewandtcell
- Go 1.16+
- IPFS node with pubsub
- Clone the repository:
git clone https://github.com/d6o/ipfschat.git
cd ipfschat- Install dependencies:
go mod tidy- Run the application:
go run main.go <topic>Replace <topic> with the desired chat topic.
- Start your IPFS daemon:
ipfs daemon- Run the IPFSChat application with a topic of your choice:
go run main.go mytopic- Use the terminal interface to send and receive messages securely.
The main components of IPFSChat include:
- DHKey Exchange: Uses the dhkxlibrary for Diffie-Hellman key exchange to establish shared secrets with peers.
- IPFS PubSub: Utilizes the IPFS PubSub system to publish and subscribe to messages on a specified topic.
- Encryption: Messages are encrypted with AES-GCM using the shared secret derived from the Diffie-Hellman exchange.
- Terminal UI: The user interface is built using tviewandtcell, providing a text-based UI for interaction.
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.
