blob: ae34f81766b00a509d643cb692a51d4bfc70a451 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# DcHaT
Decentralized chat using odhtdb. Currently only runs on GNU/Linux.
Max avatar size is 1mb
# Dependencies
opendht, boost, libnsgif, mpv, sfml
# Building
Using [sibs](https://github.com/DEC05EBA/sibs) run `sibs build --release` in the root directory of the project and then run dchat using `./sibs-build/release/dchat`
## GNU/Linux specific
xsel, curl
# TODO
Use http(s) library to download content (curl?) and stream gif. If content is html, then stop downloading after we have retrieved title, header image and paragraph
# Channel invite
Inviting users to channel is done by generating an invite key which is a combination of the node hash and an encryption key (a new encryption key, not the same as the one that is used for the channel nodes themselves).
After generating the invite key, the user that generated it will listen to requests to join the channel using InfoHash generated by the node hash and encryption key.
The user that wants to join the channel using the invite key has to sign a message using their public key and encrypt it using the invite encryption key and send it to the same InfoHash the creator of the invite key is using.
If the creator of the invite key can verify that the message they received was signed with the public key that exists in the message and the message can be decrypted using the invite encryption key, then they will respond with the channel node encryption key.
The user that created the invite key will then add the user to the channel and the user that wants to join will wait until they receive 'ADD DATA' node that with the public key that they requested to be added with,
by receiving and decrypting node data with the key the got from the creator of the invite key.
# Handle incorrect decryption key
When joining a channel using invite key, we might be given an incorrect decryption key. If that is the case then currently the client crashes
because decryption fails. This should be gracefully handled
# Screenshot
![Sample screenshot](https://i.imgur.com/z0Ee0Rw.png)
|