From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH] lib/crypto: Remove unused file blockhash.h
Date: Sat, 14 Mar 2026 10:35:26 -0700 [thread overview]
Message-ID: <20260314173526.17349-1-ebiggers@kernel.org> (raw)
For a short time this file was used by the SHA-256 and Poly1305 library
code, but they are no longer using it. Remove this unused file.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
This patch is targeting libcrypto-next
include/crypto/internal/blockhash.h | 52 -----------------------------
1 file changed, 52 deletions(-)
delete mode 100644 include/crypto/internal/blockhash.h
diff --git a/include/crypto/internal/blockhash.h b/include/crypto/internal/blockhash.h
deleted file mode 100644
index 52d9d4c82493d..0000000000000
--- a/include/crypto/internal/blockhash.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Handle partial blocks for block hash.
- *
- * Copyright (c) 2015 Linaro Ltd <ard.biesheuvel@linaro.org>
- * Copyright (c) 2025 Herbert Xu <herbert@gondor.apana.org.au>
- */
-
-#ifndef _CRYPTO_INTERNAL_BLOCKHASH_H
-#define _CRYPTO_INTERNAL_BLOCKHASH_H
-
-#include <linux/string.h>
-#include <linux/types.h>
-
-#define BLOCK_HASH_UPDATE_BASE(block_fn, state, src, nbytes, bs, dv, \
- buf, buflen) \
- ({ \
- typeof(block_fn) *_block_fn = &(block_fn); \
- typeof(state + 0) _state = (state); \
- unsigned int _buflen = (buflen); \
- size_t _nbytes = (nbytes); \
- unsigned int _bs = (bs); \
- const u8 *_src = (src); \
- u8 *_buf = (buf); \
- while ((_buflen + _nbytes) >= _bs) { \
- const u8 *data = _src; \
- size_t len = _nbytes; \
- size_t blocks; \
- int remain; \
- if (_buflen) { \
- remain = _bs - _buflen; \
- memcpy(_buf + _buflen, _src, remain); \
- data = _buf; \
- len = _bs; \
- } \
- remain = len % bs; \
- blocks = (len - remain) / (dv); \
- (*_block_fn)(_state, data, blocks); \
- _src += len - remain - _buflen; \
- _nbytes -= len - remain - _buflen; \
- _buflen = 0; \
- } \
- memcpy(_buf + _buflen, _src, _nbytes); \
- _buflen += _nbytes; \
- })
-
-#define BLOCK_HASH_UPDATE(block, state, src, nbytes, bs, buf, buflen) \
- BLOCK_HASH_UPDATE_BASE(block, state, src, nbytes, bs, 1, buf, buflen)
-#define BLOCK_HASH_UPDATE_BLOCKS(block, state, src, nbytes, bs, buf, buflen) \
- BLOCK_HASH_UPDATE_BASE(block, state, src, nbytes, bs, bs, buf, buflen)
-
-#endif /* _CRYPTO_INTERNAL_BLOCKHASH_H */
base-commit: ce260754bb435aea18e6a1a1ce3759249013f5a4
--
2.53.0
next reply other threads:[~2026-03-14 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 17:35 Eric Biggers [this message]
2026-03-17 11:07 ` [PATCH] lib/crypto: Remove unused file blockhash.h Ard Biesheuvel
2026-03-17 16:39 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260314173526.17349-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.