summaryrefslogtreecommitdiff
path: root/include/crypto/blake2s.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-01-11 14:37:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-25 11:48:58 +0200
commitc35093ff22bb9524d8c2022b97867f67134d2d9f (patch)
tree63786dcb8671170e8baae997171190d51910408f /include/crypto/blake2s.h
parent5d51b96fe669cc2a3d1e0d8764fef7096273d67a (diff)
lib/crypto: blake2s: move hmac construction into wireguard
commit d8d83d8ab0a453e17e68b3a3bed1f940c34b8646 upstream. Basically nobody should use blake2s in an HMAC construction; it already has a keyed variant. But unfortunately for historical reasons, Noise, used by WireGuard, uses HKDF quite strictly, which means we have to use this. Because this really shouldn't be used by others, this commit moves it into wireguard's noise.c locally, so that kernels that aren't using WireGuard don't get this superfluous code baked in. On m68k systems, this shaves off ~314 bytes. Cc: Herbert Xu <herbert@gondor.apana.org.au> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> [Jason: for stable, skip the wireguard changes, since this kernel doesn't have wireguard.] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/crypto/blake2s.h')
-rw-r--r--include/crypto/blake2s.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/crypto/blake2s.h b/include/crypto/blake2s.h
index b471deac28ff8..00472cb95ead1 100644
--- a/include/crypto/blake2s.h
+++ b/include/crypto/blake2s.h
@@ -100,7 +100,4 @@ static inline void blake2s(u8 *out, const u8 *in, const u8 *key,
blake2s_final(&state, out);
}
-void blake2s256_hmac(u8 *out, const u8 *in, const u8 *key, const size_t inlen,
- const size_t keylen);
-
#endif /* BLAKE2S_H */