mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
BLAKE2s has no currently known use as an shash. Just remove all of this
unnecessary plumbing. Removing this shash was something we talked about
back when we were making BLAKE2s a built-in, but I simply never got
around to doing it. So this completes that project.
Importantly, this fixs a bug in which the lib code depends on
crypto_simd_disabled_for_test, causing linker errors.
Also add more alignment tests to the selftests and compare SIMD and
non-SIMD compression functions, to make up for what we lose from
testmgr.c.
Reported-by: gaochao <[email protected]>
Cc: Eric Biggers <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: [email protected]
Fixes: 6048fdcc5f ("lib/crypto: blake2s: include as built-in")
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
22 lines
586 B
C
22 lines
586 B
C
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
|
|
/*
|
|
* Helper functions for BLAKE2s implementations.
|
|
* Keep this in sync with the corresponding BLAKE2b header.
|
|
*/
|
|
|
|
#ifndef _CRYPTO_INTERNAL_BLAKE2S_H
|
|
#define _CRYPTO_INTERNAL_BLAKE2S_H
|
|
|
|
#include <crypto/blake2s.h>
|
|
#include <linux/string.h>
|
|
|
|
void blake2s_compress_generic(struct blake2s_state *state, const u8 *block,
|
|
size_t nblocks, const u32 inc);
|
|
|
|
void blake2s_compress(struct blake2s_state *state, const u8 *block,
|
|
size_t nblocks, const u32 inc);
|
|
|
|
bool blake2s_selftest(void);
|
|
|
|
#endif /* _CRYPTO_INTERNAL_BLAKE2S_H */
|