lib: add BLAKE2 hash support
authorQu Wenruo <wqu@suse.com>
Mon, 27 Dec 2021 06:12:07 +0000 (14:12 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 18 Jan 2022 13:31:02 +0000 (08:31 -0500)
commit7c3fd5c25dd005c5eef54cc629fcbfcf48a04e9a
tree688d80b3e384015e5a31c7def8d4d77c2df1383f
parentae435aefbcb5064a82ba94ec0b22cfe1315b243c
lib: add BLAKE2 hash support

The code is cross-ported from BLAKE2 reference implementation
(https://github.com/BLAKE2/BLAKE2).

With minimal change to remove unused macros/features.

Currently there is only one user inside U-boot (btrfs), and since it
only utilize BLAKE2B, all other favors are all removed.

Signed-off-by: Qu Wenruo <wqu@suse.com>
[trini: Rename ROUND to R to avoid clash with <linux/bitops.h>
Signed-off-by: Tom Rini <trini@konsulko.com>
include/u-boot/blake2.h [new file with mode: 0644]
lib/Kconfig
lib/Makefile
lib/blake2/blake2-impl.h [new file with mode: 0644]
lib/blake2/blake2b.c [new file with mode: 0644]