-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for BLAKE2bp and BLAKE2sp
On an Intel i9-9880H with AVX2 support, both BLAKE2bp and BLAKE2sp are about 1.75x faster than BLAKE2b. Note that while these algorithms can be implemented with multi-threading, these implementations from blake2b_simd and blake2s_simd are single-threaded, using only SIMD parallelism.
- Loading branch information
1 parent
b570333
commit fb0ba5e
Showing
8 changed files
with
113 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#![no_std] | ||
#![feature(test)] | ||
|
||
digest::bench!(blake2::Blake2bp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#![no_std] | ||
#![feature(test)] | ||
|
||
digest::bench!(blake2::Blake2sp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use digest::generic_array::typenum::{U128, U64}; | ||
|
||
blake2_impl!( | ||
VarBlake2bp, | ||
Blake2bp, | ||
blake2b_simd::blake2bp::State, | ||
blake2b_simd::blake2bp::Params, | ||
U128, | ||
U64, | ||
U64, | ||
"Blake2bp instance with a variable output.", | ||
"Blake2bp instance with a fixed output.", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use digest::generic_array::typenum::{U32, U64}; | ||
|
||
blake2_impl!( | ||
VarBlake2sp, | ||
Blake2sp, | ||
blake2s_simd::blake2sp::State, | ||
blake2s_simd::blake2sp::Params, | ||
U64, | ||
U32, | ||
U32, | ||
"Blake2sp instance with a variable output.", | ||
"Blake2sp instance with a fixed output.", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters