Commit Graph

4 Commits

Author SHA1 Message Date
Qu Wenruo
903e93e814 btrfs-progs: crypto: move optimized declarations to blake2b.h
This is to avoid -Wmissing-prototypes warnings.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:02:31 +02:00
David Sterba
474c980386 btrfs-progs: crypto: remove unused declarations of blake2 variants
We use only the 2b variant, we can remove the rest.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-17 01:16:02 +01:00
David Sterba
d1c366ee42 btrfs-progs: crypto: call blake2 implementations by pointer
Change how blake2 implementation is selected. Instead of an if-else check
inside blake2b_compress each time, select the best one and assign the
function pointer. This is slightly faster.

At this point the selection is not implemented properly in
hash-speedtest so all results are from the fastest version. This will
be fixed once all algorithms are converted.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-02-28 19:53:43 +01:00
David Sterba
3778ece7ff btrfs-progs: add blake2b reference implementation
Upstream commit 997fa5ba1e14b52c554fb03ce39e579e6f27b90c,
git repository: git://github.com/BLAKE2/BLAKE2

The reference implemetation added in this patch is unchanged and will be
modified only to compile in current code base and with minimal other
modifications in case of future sync with upstream code. IOW, the coding
style should stay as-is and does not conform to the other btrfs-progs
code. This is an exception for xxhash and sha256 code as well.

Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-18 19:21:05 +01:00