This project is a secure chat application built with React, WebCrypto API and PeerJS. It utilizes WebRTC for peer-to-peer communication and ECDH for key exchange to establish a secure channel.
- Peer-to-peer communication using WebRTC.
- Secure key exchange with Elliptic-curve Diffie–Hellman (ECDH).
- Encryption and decryption of messages using AES-GCM.
- Unique chat room links for initiating a chat.
- Short Authentication String (SAS) for confirming the identity of participants.
To run this project, you will need Node.js and npm installed on your machine.
- Clone the repository to your local machine.
- Navigate to the cloned directory and run
npm install
to install dependencies. - Start the development server with
npm start
.
To host a chat room:
- Navigate to the root path
/
to create a new room. - Share the unique chat link with another party.
To join a chat room:
- Receive a unique chat link from the host.
- Navigate to the provided link to join the chat.
Once connected, both parties should confirm the SAS displayed at the top of the chat interface to ensure the security of the communication channel.
Contributions to this project are welcome. Please fork the repository and submit a pull request for any enhancements or bug fixes.
This project is open-sourced under the MIT license. See the LICENSE file for more details.
This project is also hosted on Cloudflare at the following URL: one-time-chat.pages.dev. You can use this hosted version as well.