Proton is a linux kernel module based on libhydrogen that provides crypto functions callable from XDP programs
Because I'm crazy and I write highly performant network components and backends in XDP, and I need access to crypto functions to make those work. Maybe you're crazy too?
Run ./install.sh to build and install the kernel module and set it to load on boot.
Now you can include proton.h in your XDP programs and call crypto functions like this:
These functions are compatible with crypto done in userspace using the regular libhydrogen, but please take special care with secretbox because I had to change the function signature.
The reason is that there is a limit of 5 arguments per-kfunc and you need to pass in array lengths via *__sz for the BPF verifier.
Because of this, the secretbox functions encrypt and decrypt in-place and you need to pass in a pointer to the data with the crypto header included at the front for both encrypt and decrypt.
If you'd like to see an example of proton in action take a look at the new Network Next backend I'm writing in XDP: https://github.com/networknext/protect
.png)

![The 8pen input method for phones (2010) [video]](https://www.youtube.com/img/desktop/supported_browsers/edgium.png)
