Jump to content


[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



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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...