Skip to content

Example of ChaCha20 encrypted chat with ECDH key exchange

License

Notifications You must be signed in to change notification settings

rumkin/cha-cha-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat with ChaCha20 encryption

This is a simple realtime only chat with end-to-end encryption. This repository is just an example and should not be used as complete solution for information security system without addintional server configuration. Also it doesn't protect members from MITM attack without some security additions (you can use SSL-certificate for it).

Cryptography

This chat use ECDH (Diffie-Hellman) algorythm to safely exchange encryption keys using central server. Chat uses ChaCha20 algorythm to encrypt message content. ChaCha20 is recommended by Google as TLS protocol.

Example

Run server

node server.js

In another two terminals run clients. Client usage is: node client.js <ROOM> <Message>:

# Client 1
node client.js my-secret-room-id "Hello client 2"
# Client 2
node client.js my-secret-room-id "Hello client 1"

After calling this both clients should be terminated.

License

MIT.

About

Example of ChaCha20 encrypted chat with ECDH key exchange

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published