End-to-end encrypted instant web chat
Darkwire server is a Node.js application.
Darkwire Web Client
.env.dist files in
client/ directories without the
extensions and adapt them to your needs.
You must have a https connection for Darkwire to work because it's using crypto browser API which is accessible only on localhost and behind a https connection.
You can use nvm to install the right version of node using this command:
nvm install # If the right node version is not already installed nvm use npm install yarn -g # To install yarn
Start server and client
$ yarn setup $ yarn dev
Just run the following:
$ docker-compose up
This will automatically create the default
.env files for you.
Create server and client production builds
$ yarn build
$ yarn start
$ docker build --tag darkwire.io:latest .
Then run it. Example:
$ docker run --init --name darkwire.io --rm -p 3001:3001 darkwire.io
You are able to use any of the enviroment variables available in
client/.env.dist. The defaults are available in Dockerfile
Please report any security issues to
How it works
Darkwire uses a combination of asymmetric encryption (RSA-OAEP), symmetric session keys (AES-CBC) and signing keys (HMAC) for security.
Here's an overview of a chat between Alice and Bob (also applies to group chats):
Group chats work the same way because in step 5 we encrypt keys with everyone's public key. When a message is sent out, it includes encrypted keys for everyone in the room, and the recipients then pick out the ones for them based on their user ID.
Darkwire does not provide any guarantee that the person you're communicating with is who you think they are. Authentication functionality may be incorporated in future versions.
Darkwire encodes documents into base64 using btoa and is encrypted the same way chat messages are.
The default transferable file size limit is 4MB, but can be changed in
.env file with the
Sockets & Server
Rooms are stored in memory on the server until all participants have left, at which point the room is destroyed. Only public keys are stored in server memory for the duration of the room's life.
Chat history is stored in each participant's browser, so it is effectively erased (for that user) when their window is closed.
Twice a month we will interview people behind open source businesses. We will talk about how they are building a business on top of open source projects.
We'll never share your email with anyone else.