A small core of Veil2
functionality is
implemented in C for security and performance.
Improved security is achieved by ensuring that our session privileges data structures cannot be tampered with (unless you have superuser rights in which case you can't be stopped anyway).
Our privilege testing functions achieve high performance by being implemented in C using an in-memory cache of privileges.
The C implementation is documented internally using Doxygen. You can access that documentation here.