Jump to content
Sign in to follow this  

[C/Elixir] TCP Server With Encryption

Recommended Posts

Hey everyone,


I just wanted to share my latest project. This application implements a TCP client and server. The client is written in C and uses a library named Libsodium for encryption and hashing. The server is programmed in Elixir and uses ErLang's Crypto module for decryption and hashing.


A program named "genkey" is also included for generating a key that is typically 32 bytes in size. This key will be used as a shared key between the client and server.


The client encrypts messages inputted by the user and sends it to the server. The server decrypts these messages using the same key, IV/nonce, and tag (generated from the client program for the MAC).


This application uses the Chacha20_poly1305 symmetric cipher which utilizes Chacha20 (cipher) and Poly1305 (MAC).


More information can be found in the GitHub project! This project will be serving as a foundation for my future projects such as my Barricade Firewall project that I plan to work on very soon!


GitHub Project



  • Like 2
  • Winner 1

Share this post

Link to post
Share on other sites

I wanted to give a big shoutout to @Dreae for helping me understand the Chacha20_poly1305 cipher along with encryption in general and answering any questions I have. He has been a HUGE help, as usual :)


I'm sorry for messaging you 200 times yesterday regarding the issues I was running into LOL.

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...