git clone https://github.com/jossweb/jossnet-core
cd jossnet-core
./init
⚠️ If you have a file rights problem, run this command to give yourself execution rights.
chmod 111 init.sh
gcc server.c endpoint.c ../common/common.c ../keygen/keygen.c ../cjson/cJSON.c \
-I../build/include \
../build/lib/libnoisekeys.a \
../build/lib/libnoiseprotobufs.a \
../build/lib/libnoiseprotocol.a \
-o server
./server
gcc client.c ../common/common.c ../keygen/keygen.c ../cjson/cJSON.c \
-I../build/include \
../build/lib/libnoisekeys.a \
../build/lib/libnoiseprotobufs.a \
../build/lib/libnoiseprotocol.a \
-o client
./client
By default, the server is accessible on port 2006, but you can change the port using the line below.
On the client side, you can change the target IP and port according to your needs using the following two lines.
Diffie-Hellman uses mathematical operations on elliptic curves, which are structures that secure key exchange. In the case of Jossnet, only the curves Curve25519 and Curve448 are supported, providing an optimal balance between security and performance during the shared secret generation. You can choose either of these two curves by modifying the corresponding value in the client.c file. The only accepted values are 25519 and 448. After making this change, recompilation is required.
Finally, it’s important to change the hardcoded secrets, as they are publicly available on GitHub and could lead to security vulnerabilities. Here are the values you should customize to avoid this issue: