diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-10-18 07:31:05 +0300 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2025-10-30 08:04:24 +0300 |
| commit | fa3ca9bfe3f001ed306cb3ce9761dacffbe143f8 (patch) | |
| tree | ba7d4a1b7f02a583daee80830e18a6087f869e8c /include/crypto/blake2b.h | |
| parent | ba6617bd47c2263bd2ead34e1b31d90c66af5dea (diff) | |
| download | linux-fa3ca9bfe3f001ed306cb3ce9761dacffbe143f8.tar.xz | |
crypto: blake2b - Reimplement using library API
Replace blake2b_generic.c with a new file blake2b.c which implements the
BLAKE2b crypto_shash algorithms on top of the BLAKE2b library API.
Change the driver name suffix from "-generic" to "-lib" to reflect that
these algorithms now just use the (possibly arch-optimized) library.
This closely mirrors crypto/{md5,sha1,sha256,sha512}.c.
Remove include/crypto/internal/blake2b.h since it is no longer used.
Likewise, remove struct blake2b_state from include/crypto/blake2b.h.
Omit support for import_core and export_core, since there are no legacy
drivers that need these for these algorithms.
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251018043106.375964-10-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'include/crypto/blake2b.h')
| -rw-r--r-- | include/crypto/blake2b.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/crypto/blake2b.h b/include/crypto/blake2b.h index 4879e2ec2686..3bc37fd103a7 100644 --- a/include/crypto/blake2b.h +++ b/include/crypto/blake2b.h @@ -7,20 +7,10 @@ #include <linux/types.h> #include <linux/string.h> -struct blake2b_state { - /* 'h', 't', and 'f' are used in assembly code, so keep them as-is. */ - u64 h[8]; - u64 t[2]; - /* The true state ends here. The rest is temporary storage. */ - u64 f[2]; -}; - enum blake2b_lengths { BLAKE2B_BLOCK_SIZE = 128, BLAKE2B_HASH_SIZE = 64, BLAKE2B_KEY_SIZE = 64, - BLAKE2B_STATE_SIZE = offsetof(struct blake2b_state, f), - BLAKE2B_DESC_SIZE = sizeof(struct blake2b_state), BLAKE2B_160_HASH_SIZE = 20, BLAKE2B_256_HASH_SIZE = 32, |
