[PATCH 3/5] crypto: blake2b - export helpers for optimized implementations
David Sterba
dsterba at suse.cz
Thu Dec 17 12:15:40 EST 2020
On Tue, Dec 15, 2020 at 03:47:06PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers at google.com>
>
> In preparation for adding architecture-specific implementations of
> BLAKE2b, create a header <crypto/blake2b.h> that contains common
> constants, structs, and helper functions for BLAKE2b.
>
> Furthermore, export the BLAKE2b generic setkey(), init(), update(), and
> final() functions, and add functions __crypto_blake2b_update() and
> __crypto_blake2b_final() which take a pointer to a
> blake2b_compress_blocks_t function.
>
> This way, optimized implementations of BLAKE2b only have to provide an
> implementation of blake2b_compress_blocks_t. (This is modeled on how
> the nhpoly1305 implementations work. Also, the prototype of
> blake2b_compress_blocks_t is meant to be similar to that of
> blake2s_compress_arch().)
>
> Signed-off-by: Eric Biggers <ebiggers at google.com>
Reviewed-by: David Sterba <dsterba at suse.com>
More information about the linux-arm-kernel
mailing list