crypto: Move blake2s_hmac() to its only user wg_noise.cThe blake2s_hmac() is simply an ad-hoc HMAC implementation using theBLAKE2s hash algorithm. It's not generic; a proper solution is toimplem
crypto: Move blake2s_hmac() to its only user wg_noise.cThe blake2s_hmac() is simply an ad-hoc HMAC implementation using theBLAKE2s hash algorithm. It's not generic; a proper solution is toimplement the HMAC construction that supports any hash algorithms.Therefore, it's better to move blake2s_hmac() to wg_noise.c asnoise_hmac().See also: https://git.zx2c4.com/wireguard-freebsd/commit/?id=5c5832279855722b939a381b9a291dc5ca2ee52e
show more ...
crypto: Fix the KKASSERT() in blake2s_init_key()
crypto: Minor cleanups to blake2s- Adjust the KKASSERT() to be easier to read.- Add KKASSERT() to blake2s_hmac(), avoiding the possible misuse of passing a too large 'outlen', which could cause
crypto: Minor cleanups to blake2s- Adjust the KKASSERT() to be easier to read.- Add KKASSERT() to blake2s_hmac(), avoiding the possible misuse of passing a too large 'outlen', which could cause panic or data corruption.- Minor style cleanups.
crypto: Remove unnecessary 'const' qualifiers in blake2s
crypto: Adjust blake2 and hook to buildMake necessary changes to make it build. Meanwhile, adjust the style abit to look more consistent.
crypto: Import BLAKE2s implementation from OpenBSDRequired by the in-kernel WireGuard VPN.