aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* crypto: optimize out `if (encrypt)`Jason A. Donenfeld2021-04-241-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: chacha and poly in same loopMatt Dunwoodie2021-04-191-92/+58
| | | | | | | | | | This is a fixup of f685f466, where previously we chacha'd in a different loop to poly'ing. Now we do in the same loop to keep the cache hot. In practice this didn't result in an (easily) observable change, which could be due to only having 1-2 mbufs in a chain. However this is still the preferred way to do it. Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
* crypto: encrypt mbuf in placeMatt Dunwoodie2021-04-191-0/+126
| | | | | | | | | | | This introduces a couple of routines to encrypt the mbufs in place. It is likely that these will be replaced by something in opencrypto, however for the time being this fixes a heap overflow and sets up wg_noise for the "correct" API. When the time comes, this should make it easier to drop in new crypto. It should be noted, this was written at 0500. Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
* Initial importJason A. Donenfeld2021-03-171-0/+1694
There's still more to do with wiring this up properly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>