aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* crypto: inline blake2s convenience functionJason A. Donenfeld2022-06-141-2/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg_noise: import hmac from cryptoJason A. Donenfeld2022-06-141-3/+0
| | | | | | | This is weird and no library should implement it. Bring it into wg_noise instead. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: harmonize with compat and clean upJason A. Donenfeld2022-06-141-60/+48
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: use curve25519 API from the kernel when availableJohn Baldwin2022-06-141-0/+8
| | | | Signed-off-by: John Baldwin <jhb@FreeBSD.org>
* crypto: use <crypto/chacha20_poly1305.h> when presentJohn Baldwin2022-06-141-8/+64
| | | | Signed-off-by: John Baldwin <jhb@FreeBSD.org>
* crypto: use OCF to encrypt/decrypt packets when supportedJohn Baldwin2022-06-141-1/+9
| | | | | | | | This requires the the recent changes in FreeBSD to support the Chacha20-Poly1305 AEAD cipher with support for an 8 byte nonce (vs the 12 byte nonce used by TLS and IPsec). Signed-off-by: John Baldwin <jhb@FreeBSD.org>
* crypto: return an error code from mbuf crypt routinesJohn Baldwin2022-06-101-2/+2
| | | | | | This permits returning different error codes for different conditions. Signed-off-by: John Baldwin <jhb@FreeBSD.org>
* crypto: encrypt mbuf in placeMatt Dunwoodie2021-04-191-0/+9
| | | | | | | | | | | 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/+103
There's still more to do with wiring this up properly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>