multiplayer-community-contributions
multiplayer-community-contributions copied to clipboard
feat: add ChaCha20 crypto transport
Two things not yet finished:
- IV and Counter has to be reset for every packet. Otherwise we will get a keystream mismatch when a packet goes out of order or go missing.
- There is not yet a validation handler for certificates. All certificates are blindly just "accepted".
Both these things should be fixed before we merge this. But it's a good starting point for crypto. I will get to this once I have time. Just thought it still might be useful as a PR in the meantime.
Counter synchronization is now implemeneted. You can have anywhere between 64-128 blocks of loss or reordering before things break.
This could be massively improved by using some of the first header byte to store a slightly larger counter (just a few bits would make a huge difference). This however requires custom int rollover so will have to be future developments.
A cert handler is also implemented and required when using signed handshakes.
Had to retarget this at main so that we can delete the master branch.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.