summaryrefslogtreecommitdiff
path: root/lib/crypto/arm/blake2s.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-08-27 08:11:30 -0700
committerEric Biggers <ebiggers@kernel.org>2025-08-29 09:50:19 -0700
commit39ee3970f26d55b57343da392d45117d7f893205 (patch)
tree97ca5c6257117cdfe47b43ceb771f53ffaf276a5 /lib/crypto/arm/blake2s.h
parent5d313a7625fabe9b92eaca7c5ce0e6d1019d279a (diff)
lib/crypto: blake2s: Consolidate into single C translation unit
As was done with the other algorithms, reorganize the BLAKE2s code so that the generic implementation and the arch-specific "glue" code is consolidated into a single translation unit, so that the compiler will inline the functions and automatically decide whether to include the generic code in the resulting binary or not. Similarly, also consolidate the build rules into lib/crypto/{Makefile,Kconfig}. This removes the last uses of lib/crypto/{arm,x86}/{Makefile,Kconfig}, so remove those too. Don't keep the !KMSAN dependency. It was needed only for other algorithms such as ChaCha that initialize memory from assembly code. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250827151131.27733-12-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'lib/crypto/arm/blake2s.h')
-rw-r--r--lib/crypto/arm/blake2s.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/crypto/arm/blake2s.h b/lib/crypto/arm/blake2s.h
new file mode 100644
index 000000000000..aa7a97139ea7
--- /dev/null
+++ b/lib/crypto/arm/blake2s.h
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/* defined in blake2s-core.S */
+void blake2s_compress(struct blake2s_state *state, const u8 *block,
+ size_t nblocks, u32 inc);